File tree Expand file tree Collapse file tree 4 files changed +10
-25
lines changed Expand file tree Collapse file tree 4 files changed +10
-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 34
34
# endif
35
35
#endif
36
36
37
- #ifndef OSHMEM_DESTRUCTOR
38
- # if defined(OPAL_C_HAVE_VISIBILITY) && (OPAL_C_HAVE_VISIBILITY == 1)
39
- # define OSHMEM_DESTRUCTOR __attribute__ ((__destructor__))
40
- # else
41
- # define OSHMEM_DESTRUCTOR
42
- # endif
43
- #endif
44
-
45
37
#include < pshmemx.h>
46
38
47
39
#if defined(c_plusplus) || defined(__cplusplus)
@@ -61,7 +53,7 @@ OSHMEM_DECLSPEC void pshmem_global_exit(int status);
61
53
/*
62
54
* Finalization routines
63
55
*/
64
- OSHMEM_DECLSPEC void pshmem_finalize (void ) OSHMEM_DESTRUCTOR ;
56
+ OSHMEM_DECLSPEC void pshmem_finalize (void );
65
57
66
58
/*
67
59
* 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
40
42
# endif
41
43
#endif
42
44
43
- #ifndef OSHMEM_DESTRUCTOR
44
- # if defined(OPAL_C_HAVE_VISIBILITY ) && (OPAL_C_HAVE_VISIBILITY == 1 )
45
- # define OSHMEM_DESTRUCTOR __attribute__((__destructor__))
46
- # else
47
- # define OSHMEM_DESTRUCTOR
48
- # endif
49
- #endif
50
-
51
45
#include <shmem-compat.h>
52
46
#include <shmemx.h>
53
47
@@ -118,7 +112,7 @@ enum shmem_wait_ops {
118
112
* Initialization routines
119
113
*/
120
114
OSHMEM_DECLSPEC void shmem_init (void );
121
- OSHMEM_DECLSPEC void shmem_finalize (void ) OSHMEM_DESTRUCTOR ;
115
+ OSHMEM_DECLSPEC void shmem_finalize (void );
122
116
OSHMEM_DECLSPEC void shmem_global_exit (int status );
123
117
124
118
/*
Original file line number Diff line number Diff line change 1
1
/*
2
2
* Copyright (c) 2013-2015 Mellanox Technologies, Inc.
3
3
* All rights reserved.
4
+ * Copyright (c) 2016 Research Organization for Information Science
5
+ * and Technology (RIST). All rights reserved.
4
6
* $COPYRIGHT$
5
7
*
6
8
* Additional copyrights may follow
@@ -49,6 +51,7 @@ void start_pes(int npes)
49
51
static void shmem_onexit (int exitcode , void * arg )
50
52
{
51
53
oshmem_shmem_globalexit_status = exitcode ;
54
+ shmem_finalize ();
52
55
}
53
56
54
57
static inline void _shmem_init (void )
You can’t perform that action at this time.
0 commit comments