File tree Expand file tree Collapse file tree 4 files changed +12
-25
lines changed Expand file tree Collapse file tree 4 files changed +12
-25
lines changed Original file line number Diff line number Diff line change 2
2
*
3
3
* Copyright (c) 2013 Mellanox Technologies, Inc.
4
4
* All rights reserved.
5
- * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
5
+ * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
6
+ * Copyright (c) 2016 Research Organization for Information Science
7
+ * and Technology (RIST). All rights reserved.
6
8
* $COPYRIGHT$
7
9
*
8
10
* Additional copyrights may follow
52
54
# ifndef OSHMEM_MODULE_DECLSPEC
53
55
# define OSHMEM_MODULE_DECLSPEC __opal_attribute_visibility__("default")
54
56
# endif
55
- # ifndef OSHMEM_DESTRUCTOR
56
- # define OSHMEM_DESTRUCTOR __opal_attribute_destructor__
57
- # endif
58
57
# else
59
58
# ifndef OSHMEM_DECLSPEC
60
59
# define OSHMEM_DECLSPEC
61
60
# endif
62
61
# ifndef OSHMEM_MODULE_DECLSPEC
63
62
# define OSHMEM_MODULE_DECLSPEC
64
63
# endif
65
- # ifndef OSHMEM_DESTRUCTOR
66
- # define OSHMEM_DESTRUCTOR
67
- # endif
68
64
# endif
69
65
#endif /* defined(__WINDOWS__) */
70
66
Original file line number Diff line number Diff line change 2
2
* Copyright (c) 2014-2016 Mellanox Technologies, Inc.
3
3
* All rights reserved.
4
4
* Copyright (c) 2014 Intel, Inc. All rights reserved
5
+ * Copyright (c) 2016 Research Organization for Information Science
6
+ * and Technology (RIST). All rights reserved.
5
7
* $COPYRIGHT$
6
8
*
7
9
* Additional copyrights may follow
32
34
# endif
33
35
#endif
34
36
35
- #ifndef OSHMEM_DESTRUCTOR
36
- # if defined(OPAL_C_HAVE_VISIBILITY) && (OPAL_C_HAVE_VISIBILITY == 1)
37
- # define OSHMEM_DESTRUCTOR __attribute__ ((__destructor__))
38
- # else
39
- # define OSHMEM_DESTRUCTOR
40
- # endif
41
- #endif
42
-
43
37
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
44
38
#define OSHMEMP_HAVE_C11 1
45
39
#else
@@ -65,7 +59,7 @@ OSHMEM_DECLSPEC void pshmem_global_exit(int status);
65
59
/*
66
60
* Finalization routines
67
61
*/
68
- OSHMEM_DECLSPEC void pshmem_finalize (void ) OSHMEM_DESTRUCTOR ;
62
+ OSHMEM_DECLSPEC void pshmem_finalize (void );
69
63
70
64
/*
71
65
* Query routines
Original file line number Diff line number Diff line change 2
2
* Copyright (c) 2014-2016 Mellanox Technologies, Inc.
3
3
* All rights reserved.
4
4
* Copyright (c) 2014 Intel, Inc. All rights reserved
5
+ * Copyright (c) 2016 Research Organization for Information Science
6
+ * and Technology (RIST). All rights reserved.
5
7
* $COPYRIGHT$
6
8
*
7
9
* Additional copyrights may follow
39
41
# endif
40
42
#endif
41
43
42
- #ifndef OSHMEM_DESTRUCTOR
43
- # if defined(OPAL_C_HAVE_VISIBILITY ) && (OPAL_C_HAVE_VISIBILITY == 1 )
44
- # define OSHMEM_DESTRUCTOR __attribute__((__destructor__))
45
- # else
46
- # define OSHMEM_DESTRUCTOR
47
- # endif
48
- #endif
49
-
50
44
#if defined(__STDC_VERSION__ ) && (__STDC_VERSION__ >= 201112L )
51
45
#define OSHMEM_HAVE_C11 1
52
46
#else
@@ -123,7 +117,7 @@ enum shmem_wait_ops {
123
117
* Initialization routines
124
118
*/
125
119
OSHMEM_DECLSPEC void shmem_init (void );
126
- OSHMEM_DECLSPEC void shmem_finalize (void ) OSHMEM_DESTRUCTOR ;
120
+ OSHMEM_DECLSPEC void shmem_finalize (void );
127
121
OSHMEM_DECLSPEC void shmem_global_exit (int status );
128
122
129
123
/*
Original file line number Diff line number Diff line change 3
3
* All rights reserved.
4
4
* Copyright (c) 2015 Los Alamos National Security, LLC.
5
5
* All rights reserved.
6
+ * Copyright (c) 2016 Research Organization for Information Science
7
+ * and Technology (RIST). All rights reserved.
6
8
* $COPYRIGHT$
7
9
*
8
10
* Additional copyrights may follow
@@ -50,6 +52,7 @@ void start_pes(int npes)
50
52
static void shmem_onexit (int exitcode , void * arg )
51
53
{
52
54
oshmem_shmem_globalexit_status = exitcode ;
55
+ shmem_finalize ();
53
56
}
54
57
55
58
static inline void _shmem_init (void )
You can’t perform that action at this time.
0 commit comments