OpenMPI 0.1.1

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

- File List
- Globals

mpool_sm.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2006 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
13 * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
14 * Copyright (c) 2010 Los Alamos National Security, LLC.
15 * All rights reserved.
16 * $COPYRIGHT$
17 *
18 * Additional copyrights may follow
19 *
20 * $HEADER$
21 */
22 /**
23 * @file
24 */
25 #ifndef MCA_MPOOL_SM_H
26 #define MCA_MPOOL_SM_H
27
28 #include "ompi_config.h"
29
30 #include "opal/mca/event/event.h"
31
32 #include "ompi/mca/common/sm/common_sm.h"
33 #include "ompi/mca/mpool/mpool.h"
34 #include "ompi/mca/allocator/allocator.h"
35
36 BEGIN_C_DECLS
37
38 struct mca_mpool_sm_component_t {
39 mca_mpool_base_component_t super;
40 /* mca_allocator_base_module_t* sm_allocator; */
41 char* sm_allocator_name;
42 int verbose;
43 /* struct mca_mpool_sm_mmap_t *sm_mmap; */
44 };
45 typedef struct mca_mpool_sm_component_t mca_mpool_sm_component_t;
46
47 typedef struct mca_mpool_base_resources_t {
48 size_t size;
49 int32_t mem_node;
50 } mca_mpool_base_resources_t;
51
52 OMPI_MODULE_DECLSPEC extern mca_mpool_sm_component_t mca_mpool_sm_component;
53
54 typedef struct mca_mpool_sm_module_t {
55 mca_mpool_base_module_t super;
56 long sm_size;
57 mca_allocator_base_module_t * sm_allocator;
58 struct mca_mpool_sm_mmap_t *sm_mmap;
59 mca_common_sm_module_t *sm_common_module;
60 int32_t mem_node;
61 } mca_mpool_sm_module_t;
62
63 /*
64 * Initializes the mpool module.
65 */
66 void mca_mpool_sm_module_init(mca_mpool_sm_module_t* mpool);
67
68
69 /*
70 * Returns base address of shared memory mapping.
71 */
72 void* mca_mpool_sm_base(mca_mpool_base_module_t*);
73
74 /**
75 * Allocate block of shared memory.
76 */
77 void* mca_mpool_sm_alloc(
78 mca_mpool_base_module_t* mpool,
79 size_t size,
80 size_t align,
81 uint32_t flags,
82 mca_mpool_base_registration_t** registration);
83
84 /**
85 * realloc function typedef
86 */
87 void* mca_mpool_sm_realloc(
88 mca_mpool_base_module_t* mpool,
89 void* addr,
90 size_t size,
91 mca_mpool_base_registration_t** registration);
92
93 /**
94 * free function typedef
95 */
96 void mca_mpool_sm_free(
97 mca_mpool_base_module_t* mpool,
98 void * addr,
99 mca_mpool_base_registration_t* registration);
100
101 /**
102 * Fault Tolerance Event Notification Function
103 * @param state Checkpoint Stae
104 * @return OMPI_SUCCESS or failure status
105 */
106 int mca_mpool_sm_ft_event(int state);
107
108 END_C_DECLS
109
110 #endif
mca_mpool_sm_alloc
void * mca_mpool_sm_alloc(mca_mpool_base_module_t *mpool, size_t size, size_t align, uint32_t flags, mca_mpool_base_registration_t **registration)
Allocate block of shared memory.
Definition: mpool_sm_module.c:82
mca_common_sm_module_t
Definition: common_sm.h:60
mca_mpool_base_registration_t
Definition: mpool.h:44
mca_mpool_base_component_2_0_0_t
mpool component descriptor.
Definition: mpool.h:154
mca_mpool_sm_ft_event
int mca_mpool_sm_ft_event(int state)
Fault Tolerance Event Notification Function.
Definition: mpool_sm_module.c:168
mca_mpool_sm_free
void mca_mpool_sm_free(mca_mpool_base_module_t *mpool, void *addr, mca_mpool_base_registration_t *registration)
free function typedef
Definition: mpool_sm_module.c:136
mpool.h
Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana University Research and Techno...
mca_mpool_sm_realloc
void * mca_mpool_sm_realloc(mca_mpool_base_module_t *mpool, void *addr, size_t size, mca_mpool_base_registration_t **registration)
realloc function typedef
Definition: mpool_sm_module.c:113
allocator.h
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana University Research and Techno...
mca_mpool_sm_module_t
Definition: mpool_sm.h:54
mca_mpool_sm_component_t
Definition: mpool_sm.h:38
mca_allocator_base_module_t
The data structure for each component.
Definition: allocator.h:78
mca_mpool_base_resources_t
Definition: mpool_fake.h:38
mca_mpool_base_module_t
mpool module descriptor.
Definition: mpool.h:174