[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b1-97-g7fd8b6b

Service Account noreply at mpich.org
Thu Apr 23 01:32:17 CDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  7fd8b6bb6e40a1d33d38f524fdec47712eae47e7 (commit)
      from  abb56764b8dff75e636c9da985c43335742015aa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/7fd8b6bb6e40a1d33d38f524fdec47712eae47e7

commit 7fd8b6bb6e40a1d33d38f524fdec47712eae47e7
Author: Halim Amer <aamer at anl.gov>
Date:   Wed Apr 22 21:13:03 2015 -0500

    Hot fix for commit abb56764
    
    Initialize the num_queued_threads variable and updated it with the
    appropriate OPA operations.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/include/thread/mpiu_thread_posix_funcs.h b/src/include/thread/mpiu_thread_posix_funcs.h
index f0d3b94..db91208 100644
--- a/src/include/thread/mpiu_thread_posix_funcs.h
+++ b/src/include/thread/mpiu_thread_posix_funcs.h
@@ -75,6 +75,7 @@ do {                                                               \
 do {                                                                       \
     int err__;                                                          \
                                                                         \
+    OPA_store_int(&(mutex_ptr_)->num_queued_threads,0);                  \
     err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, NULL);             \
     /* FIXME: convert error to an MPIU_THREAD_ERR value */              \
     *(int *)(err_ptr_) = err__;                                         \
@@ -84,6 +85,7 @@ do {                                                                       \
 #define MPIU_Thread_mutex_create(mutex_ptr_, err_ptr_)                   \
 do {                                                                       \
     int err__;                                                          \
+    OPA_store_int(&(mutex_ptr_)->num_queued_threads,0);                  \
     pthread_mutexattr_t attr__;                                         \
                                                                         \
     /* FIXME this used to be PTHREAD_MUTEX_ERRORCHECK_NP, but we had to change
@@ -117,9 +119,9 @@ do {                                                               \
 do {                                                               \
     int err__;                                                  \
     MPIU_DBG_MSG_P(THREAD,VERBOSE,"enter MPIU_Thread_mutex_lock %p", (mutex_ptr_));      \
-    OPA_add_int(&(mutex_ptr_)->num_queued_threads, 1);                  \
+    OPA_incr_int(&(mutex_ptr_)->num_queued_threads);                  \
     err__ = pthread_mutex_lock(&(mutex_ptr_)->mutex);                   \
-    OPA_add_int(&(mutex_ptr_)->num_queued_threads, -1);                 \
+    OPA_decr_int(&(mutex_ptr_)->num_queued_threads);                 \
     /* FIXME: convert error to an MPIU_THREAD_ERR value */      \
     *(int *)(err_ptr_) = err__;                                 \
     MPIU_DBG_MSG_P(THREAD,VERBOSE,"exit MPIU_Thread_mutex_lock %p", (mutex_ptr_));      \
@@ -129,9 +131,9 @@ do {                                                               \
 do {                                                               \
     int err__;                                                  \
     MPIU_DBG_MSG_P(THREAD,VERBOSE,"enter MPIU_Thread_mutex_lock %p", (mutex_ptr_));      \
-    OPA_add_int(&(mutex_ptr_)->num_queued_threads, 1);                  \
+    OPA_incr_int(&(mutex_ptr_)->num_queued_threads);                  \
     err__ = pthread_mutex_lock(&(mutex_ptr_)->mutex);                   \
-    OPA_add_int(&(mutex_ptr_)->num_queued_threads, -1);                 \
+    OPA_decr_int(&(mutex_ptr_)->num_queued_threads);                 \
     if (err__)                                                  \
     {                                                           \
         MPIU_DBG_MSG_S(THREAD,TERSE,"  mutex lock error: %s", MPIU_Strerror(err__));       \
@@ -236,9 +238,9 @@ do {                                                                       \
     MPIU_DBG_MSG_FMT(THREAD,TYPICAL,(MPIU_DBG_FDEST,"Enter cond_wait on cond=%p mutex=%p",(cond_ptr_),(mutex_ptr_))) \
     do									\
     {									\
-        OPA_add_int(&(mutex_ptr_)->num_queued_threads, 1);              \
+        OPA_incr_int(&(mutex_ptr_)->num_queued_threads);              \
 	err__ = pthread_cond_wait((cond_ptr_), &(mutex_ptr_)->mutex);   \
-        OPA_add_int(&(mutex_ptr_)->num_queued_threads, -1);             \
+        OPA_decr_int(&(mutex_ptr_)->num_queued_threads);             \
     }									\
     while (err__ == EINTR);						\
 									\

-----------------------------------------------------------------------

Summary of changes:
 src/include/thread/mpiu_thread_posix_funcs.h |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list