File tree Expand file tree Collapse file tree 3 files changed +24
-16
lines changed Expand file tree Collapse file tree 3 files changed +24
-16
lines changed Original file line number Diff line number Diff line change 1+ Copyright (c) 2017 IBM Corporation. All rights reserved.
2+ $COPYRIGHT$
3+
4+ Additional copyrights may follow
5+
6+ $HEADER$
7+
8+ ===========================================================================
9+ This internal component includes PMIx v1.2.1 plus these two commits
10+ cherry-picked from the PMIx v1.2 branch (which will be included in the
11+ eventual PMIx v1.2.2 release).
12+
13+ * https://github.com/pmix/master/commit/a2d431cbec162b01e15920cc75df1af9ad244f06
14+ * https://github.com/pmix/master/commit/8587f278a17301633ccf6f0d7cb086e3be8f4793
Original file line number Diff line number Diff line change 33dnl Copyright (c) 2017 Mellanox Technologies, Inc.
44dnl All rights reserved.
55dnl Copyright (c) 2017 IBM Corporation. All rights reserved.
6+ dnl Copyright (c) 2017 Research Organization for Information Science
7+ dnl and Technology (RIST). All rights reserved.
68dnl $COPYRIGHT $
79dnl
810dnl Additional copyrights may follow
@@ -52,7 +54,7 @@ AC_DEFUN([PMIX_CHECK_DSTOR_LOCK],[
5254 if test " $_x_ac_fcntl_lock_found " == " 0" ; then
5355 AC_MSG_ERROR([dstore: no available locking mechanisms was found. Can not continue. Try disabling dstore])
5456 fi
57+ LIBS=" $orig_libs "
5558 fi
5659
57- LIBS= " $orig_libs "
5860])
Original file line number Diff line number Diff line change @@ -136,23 +136,11 @@ __extension__ ({ \
136136})
137137
138138#ifdef ESH_PTHREAD_LOCK
139- #define _ESH_LOCK (rwlock , operation ) \
139+ #define _ESH_LOCK (rwlock , func ) \
140140__extension__ ({ \
141141 pmix_status_t ret = PMIX_SUCCESS; \
142142 int rc; \
143- switch (operation) { \
144- case F_WRLCK: \
145- rc = pthread_rwlock_wrlock(rwlock); \
146- break; \
147- case F_RDLCK: \
148- rc = pthread_rwlock_rdlock(rwlock); \
149- break; \
150- case F_UNLCK: \
151- rc = pthread_rwlock_unlock(rwlock); \
152- break; \
153- default: \
154- rc = PMIX_ERR_BAD_PARAM; \
155- } \
143+ rc = pthread_rwlock_##func(rwlock); \
156144 if (0 != rc) { \
157145 switch (errno) { \
158146 case EINVAL: \
@@ -169,6 +157,10 @@ __extension__ ({ \
169157 } \
170158 ret; \
171159})
160+
161+ #define _ESH_WRLOCK (rwlock ) _ESH_LOCK(rwlock, wrlock)
162+ #define _ESH_RDLOCK (rwlock ) _ESH_LOCK(rwlock, rdlock)
163+ #define _ESH_UNLOCK (rwlock ) _ESH_LOCK(rwlock, unlock)
172164#endif
173165
174166#ifdef ESH_FCNTL_LOCK
@@ -209,11 +201,11 @@ __extension__ ({ \
209201 } \
210202 ret; \
211203})
212- #endif
213204
214205#define _ESH_WRLOCK (lock ) _ESH_LOCK(lock, F_WRLCK)
215206#define _ESH_RDLOCK (lock ) _ESH_LOCK(lock, F_RDLCK)
216207#define _ESH_UNLOCK (lock ) _ESH_LOCK(lock, F_UNLCK)
208+ #endif
217209
218210#define ESH_INIT_SESSION_TBL_SIZE 2
219211#define ESH_INIT_NS_MAP_TBL_SIZE 2
You can’t perform that action at this time.
0 commit comments