diff options
author | davidxu <davidxu@FreeBSD.org> | 2008-04-03 02:47:35 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2008-04-03 02:47:35 +0000 |
commit | 8d9f0070883d0563cf7117cd042e358238d95259 (patch) | |
tree | 601b708c6c7487fe6570bb88bc37d93c8f5013cc /lib/libthr/thread | |
parent | 762f60a112cb91a6194fdd32f2676041379ee788 (diff) | |
download | FreeBSD-src-8d9f0070883d0563cf7117cd042e358238d95259.zip FreeBSD-src-8d9f0070883d0563cf7117cd042e358238d95259.tar.gz |
put THR_CRITICAL_LEAVE into do .. while statement.
Diffstat (limited to 'lib/libthr/thread')
-rw-r--r-- | lib/libthr/thread/thr_private.h | 6 |
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)) |