OpenMPI  0.1.1
rcache_rb_tree.h File Reference

Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana University Research and Technology Corporation. More...

#include "ompi_config.h"
#include "opal/mca/mca.h"
#include "ompi/class/ompi_free_list.h"
#include "ompi/mca/mpool/mpool.h"
#include "rcache_rb.h"

Go to the source code of this file.

Data Structures

struct  mca_rcache_rb_tree_key_t
 Holds the key for the tree. More...
 
struct  mca_rcache_rb_tree_item_t
 The item in the rb_tree itself. More...
 

Typedefs

typedef struct
mca_rcache_rb_tree_key_t 
mca_rcache_rb_tree_key_t
 
typedef struct
mca_rcache_rb_tree_item_t 
mca_rcache_rb_tree_item_t
 

Functions

OMPI_DECLSPEC OBJ_CLASS_DECLARATION (mca_rcache_rb_tree_item_t)
 
int mca_rcache_rb_tree_init (mca_rcache_rb_module_t *rcache)
 
mca_rcache_rb_tree_item_tmca_rcache_rb_tree_find (mca_rcache_rb_module_t *rcache, void *base)
 Returns the item in the rb tree. More...
 
int mca_rcache_rb_tree_insert (mca_rcache_rb_module_t *rcache, mca_mpool_base_registration_t *reg)
 
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. More...
 

Detailed Description

Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana University Research and Technology Corporation.

All rights reserved. Copyright (c) 2004-2006 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved. Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, University of Stuttgart. All rights reserved. Copyright (c) 2004-2005 The Regents of the University of California. All rights reserved. $COPYRIGHT$

Additional copyrights may follow

$HEADER$

Description of the Registration Cache framework

Function Documentation

int mca_rcache_rb_tree_delete ( mca_rcache_rb_module_t rb_module,
mca_mpool_base_registration_t reg 
)

Function to remove previously memory from the tree without freeing it.

Parameters
basepointer to the memory to free
Return values
OMPI_SUCCESS
OMPI_ERR_BAD_PARAMif the passed base pointer was invalid

References mca_rcache_rb_tree_item_t::key, mca_rcache_rb_tree_find(), ompi_rb_tree_delete(), and mca_rcache_rb_tree_item_t::reg.

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.

Returns the item in the rb tree.

If so it returns an array of mpools the memory is registered with.

Parameters
basepointer to the memory to lookup
Return values
NULLif the memory is not in any mpool
pointerto an array of type mca_mpool_base_reg_mpool_t

References mca_rcache_rb_tree_key_t::base, mca_rcache_rb_tree_key_t::bound, mca_rcache_rb_tree_item_t::key, ompi_rb_tree_find(), and mca_rcache_rb_tree_item_t::reg.

Referenced by mca_rcache_rb_tree_delete().