summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_private.h')
-rw-r--r--lib/libthr/thread/thr_private.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
index 4855b25..68b5d53 100644
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -460,8 +460,10 @@ struct pthread {
(thrd)->critical_count++
#define THR_CRITICAL_LEAVE(thrd) \
- (thrd)->critical_count--; \
- _thr_ast(thrd);
+ do { \
+ (thrd)->critical_count--; \
+ _thr_ast(thrd); \
+ } while (0)
#define THR_UMUTEX_TRYLOCK(thrd, lck) \
_thr_umutex_trylock((lck), TID(thrd))
OpenPOWER on IntegriCloud