OpenMPI  0.1.1
rcache.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  * Copyright (c) 2009 IBM Corporation. All rights reserved.
14  * $COPYRIGHT$
15  *
16  * Additional copyrights may follow
17  *
18  * $HEADER$
19  */
20 /**
21  * @file
22  * Description of the Registration Cache framework
23  */
24 #ifndef MCA_RCACHE_H
25 #define MCA_RCACHE_H
26 #include "opal/mca/mca.h"
27 #include "ompi/mca/mpool/mpool.h"
28 #include "opal/threads/mutex.h"
29 
30 
31 /**
32  * component initialize
33  */
34 typedef struct mca_rcache_base_module_t* (*mca_rcache_base_component_init_fn_t)(void);
35 
36 
37 typedef int (*mca_rcache_base_module_find_fn_t) (
38  struct mca_rcache_base_module_t* rcache, void* addr, size_t size,
40 
41 typedef int (*mca_rcache_base_module_find_all_fn_t)(
42  struct mca_rcache_base_module_t* rcache, void* addr, size_t size,
43  mca_mpool_base_registration_t **regs, int reg_cnt);
44 
45 typedef int (*mca_rcache_base_module_insert_fn_t)(
46  struct mca_rcache_base_module_t* rcache,
47  mca_mpool_base_registration_t* registration, size_t limit);
48 
49 typedef int (*mca_rcache_base_module_delete_fn_t)(
50  struct mca_rcache_base_module_t* rcache,
51  mca_mpool_base_registration_t* registration);
52 
53 /* Do not call the clean function with the rcache lock held */
54 typedef int (*mca_rcache_base_module_clean_fn_t)(
55  struct mca_rcache_base_module_t* rcache);
56 
57 
58 /**
59  * finalize
60  */
62  struct mca_rcache_base_module_t*);
63 
64 /**
65  * rcache component descriptor. Contains component version information and
66  * open/close/init functions
67  */
68 
73 };
74 
76 
78 
79 
80 /**
81  * rcache module descriptor
82  */
84  mca_rcache_base_component_t *rcache_component; /**< component struct */
85  mca_rcache_base_module_find_fn_t rcache_find;
86  mca_rcache_base_module_find_all_fn_t rcache_find_all;
87  mca_rcache_base_module_insert_fn_t rcache_insert;
88  mca_rcache_base_module_delete_fn_t rcache_delete;
89  mca_rcache_base_module_clean_fn_t rcache_clean;
91  opal_mutex_t lock;
92 };
94 
95 /**
96  * Macro for use in components that are of type rcache
97  */
98 #define MCA_RCACHE_BASE_VERSION_2_0_0 \
99  MCA_BASE_VERSION_2_0_0, \
100  "rcache", 2, 0, 0
101 
102 #endif /* MCA_RCACHE_H */
103 
Common type for all MCA components.
Definition: mca.h:250
rcache module descriptor
Definition: rcache.h:83
mca_base_component_data_t rcache_data
metadata
Definition: rcache.h:71
Definition: mutex_unix.h:53
Definition: mpool.h:44
Top-level interface for all MCA components.
struct mca_rcache_base_module_t *(* mca_rcache_base_component_init_fn_t)(void)
component initialize
Definition: rcache.h:34
mca_rcache_base_component_t * rcache_component
component struct
Definition: rcache.h:84
Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana University Research and Techno...
rcache component descriptor.
Definition: rcache.h:69
Meta data for MCA v2.0.0 components.
Definition: mca.h:309
void(* mca_rcache_base_module_finalize_fn_t)(struct mca_rcache_base_module_t *)
finalize
Definition: rcache.h:61
mca_rcache_base_component_init_fn_t rcache_init
init function
Definition: rcache.h:72
Mutual exclusion functions.
mca_base_component_t rcache_version
version
Definition: rcache.h:70