aboutsummaryrefslogtreecommitdiff
path: root/lib/libthr
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2008-04-03 02:47:35 +0000
committerDavid Xu <davidxu@FreeBSD.org>2008-04-03 02:47:35 +0000
commitcaad30a4229e7e2bcfe7cbbe186449a7859859ea (patch)
tree601b708c6c7487fe6570bb88bc37d93c8f5013cc /lib/libthr
parent6cec2e4b55b7fc12857d6c2963427184d50f74ac (diff)
downloadsrc-caad30a4229e7e2bcfe7cbbe186449a7859859ea.tar.gz
src-caad30a4229e7e2bcfe7cbbe186449a7859859ea.zip
put THR_CRITICAL_LEAVE into do .. while statement.
Notes
Notes: svn path=/head/; revision=177871
Diffstat (limited to 'lib/libthr')
-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 4855b25134a3..68b5d53f86ab 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))