OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

rcache_vma.h
Go to the documentation of this file.
1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
2 /**
3 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4 * University Research and Technology
5 * Corporation. All rights reserved.
6 * Copyright (c) 2004-2007 The University of Tennessee and The University
7 * of Tennessee Research Foundation. All rights
8 * reserved.
9 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10 * University of Stuttgart. All rights reserved.
11 * Copyright (c) 2004-2005 The Regents of the University of California.
12 * All rights reserved.
13 *
14 * Copyright (c) 2006 Voltaire. All rights reserved.
15 * Copyright (c) 2009 IBM Corporation. All rights reserved.
16 *
17 * $COPYRIGHT$
18 *
19 * Additional copyrights may follow
20 *
21 * $HEADER$
22 */
23 /**
24 * @file
25 * Description of the Registration Cache framework
26 */
27 #ifndef MCA_RCACHE_VMA_H
28 #define MCA_RCACHE_VMA_H
29 #include "ompi_config.h"
30 #include "opal/mca/mca.h"
31 #include "opal/class/opal_list.h"
32 #include "ompi/class/ompi_rb_tree.h"
33 #include "ompi/mca/rcache/rcache.h"
34
35 BEGIN_C_DECLS
36
37 struct mca_rcache_vma_module_t {
38 mca_rcache_base_module_t base;
39 ompi_rb_tree_t rb_tree;
40 opal_list_t vma_list;
41 opal_list_t vma_delete_list;
42 size_t reg_cur_cache_size;
43 };
44 typedef struct mca_rcache_vma_module_t mca_rcache_vma_module_t;
45
46
47 struct mca_rcache_vma_component_t {
48 mca_rcache_base_component_t super;
49 };
50 typedef struct mca_rcache_vma_component_t mca_rcache_vma_component_t;
51
52 OMPI_DECLSPEC extern mca_rcache_vma_component_t mca_rcache_vma_component;
53
54
55
56 void mca_rcache_vma_module_init(mca_rcache_vma_module_t* rcache);
57
58 int mca_rcache_vma_find(mca_rcache_base_module_t* rcache, void* addr,
59 size_t size, mca_mpool_base_registration_t **reg);
60
61 int mca_rcache_vma_find_all(mca_rcache_base_module_t* rcache, void* addr,
62 size_t size, mca_mpool_base_registration_t **regs, int reg_cnt);
63
64 int mca_rcache_vma_insert(struct mca_rcache_base_module_t* rcache,
65 mca_mpool_base_registration_t* registration, size_t limit);
66
67 int mca_rcache_vma_delete(struct mca_rcache_base_module_t* rcache,
68 mca_mpool_base_registration_t* registration);
69
70 /* It is not safe to call mca_rcache_vma_clean with the rcache lock held */
71 int mca_rcache_vma_clean(struct mca_rcache_base_module_t* rcache);
72 /* Destroy vma objects which are on the deferred delete list. These were placed
73 on the list earlier when the rcache lock was held and it was not safe to
74 destory them. They should not be linked into any other structure anymore except
75 the vma_list_delete list */
76
77 /**
78 * init/finalize
79 */
80
81 void mca_rcache_vma_module_init(mca_rcache_vma_module_t *rcache);
82
83 void mca_rcache_vma_finalize(struct mca_rcache_base_module_t*);
84
85 END_C_DECLS
86
87 #endif /* MCA_RCACHE_VMA_H */
88
89
mca_rcache_base_module_t
rcache module descriptor
Definition: rcache.h:83
mca_rcache_vma_module_init
void mca_rcache_vma_module_init(mca_rcache_vma_module_t *rcache)
init/finalize
Definition: rcache_vma.c:36
mca_rcache_vma_finalize
void mca_rcache_vma_finalize(struct mca_rcache_base_module_t *)
finalize
Definition: rcache_vma.c:171
opal_list.h
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
mca_mpool_base_registration_t
Definition: mpool.h:44
mca.h
Top-level interface for all MCA components.
mca_rcache_vma_module_t
Definition: rcache_vma.h:37
mca_rcache_vma_component_t
Definition: rcache_vma.h:47
rcache.h
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana University Research and Techno...
mca_rcache_base_component_2_0_0_t
rcache component descriptor.
Definition: rcache.h:69
opal_list_t
Definition: opal_list.h:147
ompi_rb_tree_t
the data structure that holds all the needed information about the tree.
Definition: ompi_rb_tree.h:67
ompi_rb_tree.h
A red black tree.