OpenMPI 0.1.1

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

- File List
- Globals

rcache_rb_tree.h
Go to the documentation of this file.
1
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-2006 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 * $COPYRIGHT$
14 *
15 * Additional copyrights may follow
16 *
17 * $HEADER$
18 */
19 /**
20 * @file
21 * Description of the Registration Cache framework
22 */
23 #ifndef MCA_RCACHE_RB_TREE_H
24 #define MCA_RCACHE_RB_TREE_H
25 #include "ompi_config.h"
26 #include "opal/mca/mca.h"
27 #include "ompi/class/ompi_free_list.h"
28 #include "ompi/mca/mpool/mpool.h"
29 #include "rcache_rb.h"
30 /*
31 * Data structures for the tree of allocated memory
32 */
33
34 /**
35 * Holds the key for the tree
36 */
37 struct mca_rcache_rb_tree_key_t
38 {
39 void * base; /**< the base of the memory range */
40 void * bound; /**< the bound of the memory range */
41 };
42 typedef struct mca_rcache_rb_tree_key_t mca_rcache_rb_tree_key_t;
43
44 /**
45 * The item in the rb_tree itself
46 */
47 struct mca_rcache_rb_tree_item_t
48 {
49 ompi_free_list_item_t super; /**< the parent class */
50 mca_rcache_rb_tree_key_t key; /**< the key which holds the memory pointers */
51 mca_mpool_base_registration_t* reg; /**< the registration */
52 };
53 typedef struct mca_rcache_rb_tree_item_t mca_rcache_rb_tree_item_t;
54
55 OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_rcache_rb_tree_item_t);
56
57 /*
58 * initialize the rb tree
59 */
60 int mca_rcache_rb_tree_init(mca_rcache_rb_module_t* rcache);
61
62 /**
63 * Returns the item in the rb tree
64 */
65 mca_rcache_rb_tree_item_t* mca_rcache_rb_tree_find(
66 mca_rcache_rb_module_t* rcache,
67 void* base
68 );
69
70 /*
71 * insert an item in the rb tree
72 */
73 int mca_rcache_rb_tree_insert(
74 mca_rcache_rb_module_t* rcache,
75 mca_mpool_base_registration_t* reg
76 );
77
78 /*
79 * remove an item from the rb tree
80 */
81 int mca_rcache_rb_tree_delete(
82 mca_rcache_rb_module_t* rcache,
83 mca_mpool_base_registration_t* reg
84 );
85
86
87 #endif /* MCA_RCACHE_RB_TREE_H */
88
mca_rcache_rb_tree_item_t::super
ompi_free_list_item_t super
the parent class
Definition: rcache_rb_tree.h:49
mca_rcache_rb_tree_key_t::base
void * base
the base of the memory range
Definition: rcache_rb_tree.h:39
mca_rcache_rb_tree_item_t::reg
mca_mpool_base_registration_t * reg
the registration
Definition: rcache_rb_tree.h:51
mca_rcache_rb_tree_item_t::key
mca_rcache_rb_tree_key_t key
the key which holds the memory pointers
Definition: rcache_rb_tree.h:50
mca_rcache_rb_tree_item_t
The item in the rb_tree itself.
Definition: rcache_rb_tree.h:47
mca_mpool_base_registration_t
Definition: mpool.h:44
mca.h
Top-level interface for all MCA components.
mca_rcache_rb_tree_find
mca_rcache_rb_tree_item_t * mca_rcache_rb_tree_find(mca_rcache_rb_module_t *rcache, void *base)
Returns the item in the rb tree.
Definition: rcache_rb_tree.c:57
rcache_rb.h
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana University Research and Techno...
mca_rcache_rb_tree_key_t
Holds the key for the tree.
Definition: rcache_rb_tree.h:37
mca_rcache_rb_tree_delete
int mca_rcache_rb_tree_delete(mca_rcache_rb_module_t *rcache, mca_mpool_base_registration_t *reg)
Function to remove previously memory from the tree without freeing it.
Definition: rcache_rb_tree.c:147
ompi_free_list_item_t
Definition: ompi_free_list.h:62
mpool.h
Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana University Research and Techno...
mca_rcache_rb_module_t
Definition: rcache_rb.h:32
mca_rcache_rb_tree_key_t::bound
void * bound
the bound of the memory range
Definition: rcache_rb_tree.h:40
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236