OpenMPI 0.1.1

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

- File List
- Globals

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,
39 mca_mpool_base_registration_t **reg);
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 */
61 typedef void (*mca_rcache_base_module_finalize_fn_t)(
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
69 struct mca_rcache_base_component_2_0_0_t{
70 mca_base_component_t rcache_version; /**< version */
71 mca_base_component_data_t rcache_data; /**<metadata */
72 mca_rcache_base_component_init_fn_t rcache_init; /**<init function */
73 };
74
75 typedef struct mca_rcache_base_component_2_0_0_t mca_rcache_base_component_2_0_0_t;
76
77 typedef struct mca_rcache_base_component_2_0_0_t mca_rcache_base_component_t;
78
79
80 /**
81 * rcache module descriptor
82 */
83 struct mca_rcache_base_module_t {
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;
90 mca_rcache_base_module_finalize_fn_t rcache_finalize;
91 opal_mutex_t lock;
92 };
93 typedef struct mca_rcache_base_module_t mca_rcache_base_module_t;
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
mca_base_component_2_0_0_t
Common type for all MCA components.
Definition: mca.h:250
mca_rcache_base_module_t
rcache module descriptor
Definition: rcache.h:83
mca_rcache_base_component_2_0_0_t::rcache_data
mca_base_component_data_t rcache_data
metadata
Definition: rcache.h:71
opal_mutex_t
Definition: mutex_unix.h:53
mca_mpool_base_registration_t
Definition: mpool.h:44
mca.h
Top-level interface for all MCA components.
mca_rcache_base_component_init_fn_t
struct mca_rcache_base_module_t *(* mca_rcache_base_component_init_fn_t)(void)
component initialize
Definition: rcache.h:34
mca_rcache_base_module_t::rcache_component
mca_rcache_base_component_t * rcache_component
component struct
Definition: rcache.h:84
mpool.h
Copyright (c) 2004-2007 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
mca_base_component_data_2_0_0_t
Meta data for MCA v2.0.0 components.
Definition: mca.h:309
mca_rcache_base_module_finalize_fn_t
void(* mca_rcache_base_module_finalize_fn_t)(struct mca_rcache_base_module_t *)
finalize
Definition: rcache.h:61
mca_rcache_base_component_2_0_0_t::rcache_init
mca_rcache_base_component_init_fn_t rcache_init
init function
Definition: rcache.h:72
mutex.h
Mutual exclusion functions.
mca_rcache_base_component_2_0_0_t::rcache_version
mca_base_component_t rcache_version
version
Definition: rcache.h:70