1 /*
2 * Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2005 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 Cisco Systems, Inc. All rights reserved.
13 * Copyright (c) 2010-2011 Los Alamos National Security, LLC.
14 * All rights reserved.
15 * $COPYRIGHT$
16 *
17 * Additional copyrights may follow
18 *
19 * $HEADER$
20 */
21
22 #ifndef MCA_SHMEM_POSIX_EXPORT_H
23 #define MCA_SHMEM_POSIX_EXPORT_H
24
25 #include "opal_config.h"
26
27 #include "opal/mca/mca.h"
28 #include "opal/mca/shmem/shmem.h"
29
30 /* max number of attempts to find an available shm_open file name. see
31 * comments below for more details.
32 */
33 #define OPAL_SHMEM_POSIX_MAX_ATTEMPTS 128
34
35 /* need the '/' for Solaris 10 and others, i'm sure */
36 #define OPAL_SHMEM_POSIX_FILE_NAME_PREFIX "/open_mpi."
37
38 /* posix sm file name length max. on some systems shm_open's file name limit
39 * is pretty low (32 chars, for instance). 16 is plenty for our needs, but
40 * extra work on our end is needed to ensure things work properly. if a
41 * system's limit is lower than OPAL_SHMEM_POSIX_FILE_LEN_MAX, then the
42 * run-time test will catch that fact and posix sm will be disqualified. see
43 * comments regarding this in shmem_posix_module.c.
44 */
45 #define OPAL_SHMEM_POSIX_FILE_LEN_MAX 16
46
47 BEGIN_C_DECLS
48
49 /* globally exported variable to hold the posix component. */
50 typedef struct opal_shmem_posix_component_t {
51 /* base component struct */
52 opal_shmem_base_component_t super;
53 /* priority for posix component */
54 int priority;
55 } opal_shmem_posix_component_t;
56
57 OPAL_MODULE_DECLSPEC extern opal_shmem_posix_component_t
58 mca_shmem_posix_component;
59
60 typedef struct opal_shmem_posix_module_t {
61 opal_shmem_base_module_t super;
62 } opal_shmem_posix_module_t;
63 extern opal_shmem_posix_module_t opal_shmem_posix_module;
64
65 END_C_DECLS
66
67 #endif /* MCA_SHMEM_POSIX_EXPORT_H */