1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2 /*
3 * Copyright (c) 2004-2007 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 (c) 2007 Sun Microsystems, Inc. All rights reserved.
14 * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
15 * Copyright (c) 2010-2015 Los Alamos National Security, LLC.
16 * All rights reserved.
17 * $COPYRIGHT$
18 *
19 * Additional copyrights may follow
20 *
21 * $HEADER$
22 */
23 /**
24 * @file
25 */
26 #ifndef MCA_COMMON_SM_MPOOL_H
27 #define MCA_COMMON_SM_MPOOL_H
28
29 #include "opal_config.h"
30
31 #include "opal/mca/event/event.h"
32 #include "opal/mca/shmem/shmem.h"
33
34 #include "opal/mca/mpool/mpool.h"
35 #include "opal/mca/allocator/allocator.h"
36
37 BEGIN_C_DECLS
38
39 struct mca_common_sm_module_t;
40
41 typedef struct mca_common_sm_mpool_resources_t {
42 size_t size;
43 int32_t mem_node;
44 const char *allocator;
45 /* backing store metadata */
46 opal_shmem_ds_t bs_meta_buf;
47 } mca_common_sm_mpool_resources_t;
48
49 typedef struct mca_common_sm_mpool_module_t {
50 mca_mpool_base_module_t super;
51 long sm_size;
52 mca_allocator_base_module_t *sm_allocator;
53 struct mca_common_sm_mpool_mmap_t *sm_mmap;
54 struct mca_common_sm_module_t *sm_common_module;
55 int32_t mem_node;
56 } mca_common_sm_mpool_module_t;
57
58 OPAL_DECLSPEC mca_mpool_base_module_t *common_sm_mpool_create (mca_common_sm_mpool_resources_t *);
59
60 END_C_DECLS
61
62 #endif