put THR_CRITICAL_LEAVE into do .. while statement.

This commit is contained in:
David Xu 2008-04-03 02:47:35 +00:00
parent 6cec2e4b55
commit caad30a422

View file

@ -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))