Skip to content

Make Oracle compilers happy with PMIx 1.2.1+ #3062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions opal/mca/pmix/pmix112/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright (c) 2017 IBM Corporation. All rights reserved.
$COPYRIGHT$

Additional copyrights may follow

$HEADER$

===========================================================================
This internal component includes PMIx v1.2.1 plus these two commits
cherry-picked from the PMIx v1.2 branch (which will be included in the
eventual PMIx v1.2.2 release).

* https://github.com/pmix/master/commit/a2d431cbec162b01e15920cc75df1af9ad244f06
* https://github.com/pmix/master/commit/8587f278a17301633ccf6f0d7cb086e3be8f4793
4 changes: 3 additions & 1 deletion opal/mca/pmix/pmix112/pmix/config/pmix_check_lock.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ dnl
dnl Copyright (c) 2017 Mellanox Technologies, Inc.
dnl All rights reserved.
dnl Copyright (c) 2017 IBM Corporation. All rights reserved.
dnl Copyright (c) 2017 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
Expand Down Expand Up @@ -52,7 +54,7 @@ AC_DEFUN([PMIX_CHECK_DSTOR_LOCK],[
if test "$_x_ac_fcntl_lock_found" == "0"; then
AC_MSG_ERROR([dstore: no available locking mechanisms was found. Can not continue. Try disabling dstore])
fi
LIBS="$orig_libs"
fi

LIBS="$orig_libs"
])
22 changes: 7 additions & 15 deletions opal/mca/pmix/pmix112/pmix/src/dstore/pmix_esh.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,23 +136,11 @@ __extension__ ({ \
})

#ifdef ESH_PTHREAD_LOCK
#define _ESH_LOCK(rwlock, operation) \
#define _ESH_LOCK(rwlock, func) \
__extension__ ({ \
pmix_status_t ret = PMIX_SUCCESS; \
int rc; \
switch (operation) { \
case F_WRLCK: \
rc = pthread_rwlock_wrlock(rwlock); \
break; \
case F_RDLCK: \
rc = pthread_rwlock_rdlock(rwlock); \
break; \
case F_UNLCK: \
rc = pthread_rwlock_unlock(rwlock); \
break; \
default: \
rc = PMIX_ERR_BAD_PARAM; \
} \
rc = pthread_rwlock_##func(rwlock); \
if (0 != rc) { \
switch (errno) { \
case EINVAL: \
Expand All @@ -169,6 +157,10 @@ __extension__ ({ \
} \
ret; \
})

#define _ESH_WRLOCK(rwlock) _ESH_LOCK(rwlock, wrlock)
#define _ESH_RDLOCK(rwlock) _ESH_LOCK(rwlock, rdlock)
#define _ESH_UNLOCK(rwlock) _ESH_LOCK(rwlock, unlock)
#endif

#ifdef ESH_FCNTL_LOCK
Expand Down Expand Up @@ -209,11 +201,11 @@ __extension__ ({ \
} \
ret; \
})
#endif

#define _ESH_WRLOCK(lock) _ESH_LOCK(lock, F_WRLCK)
#define _ESH_RDLOCK(lock) _ESH_LOCK(lock, F_RDLCK)
#define _ESH_UNLOCK(lock) _ESH_LOCK(lock, F_UNLCK)
#endif

#define ESH_INIT_SESSION_TBL_SIZE 2
#define ESH_INIT_NS_MAP_TBL_SIZE 2
Expand Down