Lines Matching defs:l
60 #define RWST_HELD(l) ((l)->rwst_count != 0)
61 #define RWST_READ_HELD(l) ((l)->rwst_count > 0)
62 #define RWST_WRITE_HELD(l) ((l)->rwst_count < 0)
63 #define RWST_WRITE_OWNER(l) \
64 ((l)->rwst_count == (LONG_MIN | (intptr_t)curthread))
65 #define RWST_OWNER(l) (RWST_WRITE_HELD(l) ? \
66 ((struct _kthread *)((l)->rwst_count & ~LONG_MIN)) : NULL)
67 #define RWST_READ_WANTED(l) CV_HAS_WAITERS(&(l)->rwst_rcv)
68 #define RWST_WRITE_WANTED(l) CV_HAS_WAITERS(&(l)->rwst_wcv)
71 #define RWST_READ_WAIT(l, f) RWST_WAIT(&(l)->rwst_rcv, &(l)->rwst_lock, f)
72 #define RWST_WRITE_WAIT(l, f) RWST_WAIT(&(l)->rwst_wcv, &(l)->rwst_lock, f)
73 #define RWST_READ_WAKE_ALL(l) cv_broadcast(&(l)->rwst_rcv)
74 #define RWST_WRITE_WAKE_ONE(l) cv_signal(&(l)->rwst_wcv)
75 #define RWST_READ_ENTER(l) (l)->rwst_count++
76 #define RWST_WRITE_ENTER(l) (l)->rwst_count = LONG_MIN | (intptr_t)curthread
77 #define RWST_READ_EXIT(l) (l)->rwst_count--
78 #define RWST_WRITE_EXIT(l) (l)->rwst_count = 0