Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 574e37d

Browse files
authored
Merge pull request #1368 from ggouaillardet/topic/v2.x/req_wait_zero
v2.x: ompi/request: correctly handle zero count in ompi_request_default_wai…
2 parents 8b28d01 + f807f1e commit 574e37d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

opal/threads/wait_sync.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* Copyright (c) 2016 Los Alamos National Security, LLC. All rights
77
* reserved.
88
* Copyright (c) 2016 Mellanox Technologies. All rights reserved.
9+
* Copyright (c) 2016 Research Organization for Information Science
10+
* and Technology (RIST). All rights reserved.
911
* $COPYRIGHT$
1012
*
1113
* Additional copyrights may follow
@@ -84,11 +86,11 @@ static inline int sync_wait_st (ompi_wait_sync_t *sync)
8486

8587
#define WAIT_SYNC_INIT(sync,c) \
8688
do { \
87-
(sync)->count = c; \
89+
(sync)->count = (c); \
8890
(sync)->next = NULL; \
8991
(sync)->prev = NULL; \
9092
(sync)->status = 0; \
91-
(sync)->signaling = true; \
93+
(sync)->signaling = (0 != (c)); \
9294
if (opal_using_threads()) { \
9395
pthread_cond_init (&(sync)->condition, NULL); \
9496
pthread_mutex_init (&(sync)->lock, NULL); \

0 commit comments

Comments
 (0)