OpenMPI  0.1.1
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  */
38 {
39  void * base; /**< the base of the memory range */
40  void * bound; /**< the bound of the memory range */
41 };
43 
44 /**
45  * The item in the rb_tree itself
46  */
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 };
54 
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  */
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,
76  );
77 
78 /*
79  * remove an item from the rb tree
80  */
82  mca_rcache_rb_module_t* rcache,
84  );
85 
86 
87 #endif /* MCA_RCACHE_RB_TREE_H */
88 
ompi_free_list_item_t super
the parent class
Definition: rcache_rb_tree.h:49
void * base
the base of the memory range
Definition: rcache_rb_tree.h:39
mca_mpool_base_registration_t * reg
the registration
Definition: rcache_rb_tree.h:51
mca_rcache_rb_tree_key_t key
the key which holds the memory pointers
Definition: rcache_rb_tree.h:50
The item in the rb_tree itself.
Definition: rcache_rb_tree.h:47
Definition: mpool.h:44
Top-level interface for all MCA components.
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
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana University Research and Techno...
Holds the key for the tree.
Definition: rcache_rb_tree.h:37
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
Definition: ompi_free_list.h:62
Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana University Research and Techno...
Definition: rcache_rb.h:32
void * bound
the bound of the memory range
Definition: rcache_rb_tree.h:40
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236