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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
index 60be095..df41c9e 100644
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -509,6 +509,13 @@ struct pthread {
(((thrd)->locklevel > 0) || \
((thrd)->critical_count > 0))
+#define THR_CRITICAL_ENTER(thrd) \
+ (thrd)->critical_count++
+
+#define THR_CRITICAL_LEAVE(thrd) \
+ (thrd)->critical_count--; \
+ _thr_ast(thrd);
+
#define THR_UMTX_TRYLOCK(thrd, lck) \
_thr_umtx_trylock((lck), (thrd)->tid)
OpenPOWER on IntegriCloud