Lines Matching refs:__state_
19 : __state_(0) in __shared_mutex_base()
29 while (__state_ & __write_entered_) in lock()
31 __state_ |= __write_entered_; in lock()
32 while (__state_ & __n_readers_) in lock()
40 if (__state_ == 0) in try_lock()
42 __state_ = __write_entered_; in try_lock()
52 __state_ = 0; in unlock()
62 while ((__state_ & __write_entered_) || (__state_ & __n_readers_) == __n_readers_) in lock_shared()
64 unsigned num_readers = (__state_ & __n_readers_) + 1; in lock_shared()
65 __state_ &= ~__n_readers_; in lock_shared()
66 __state_ |= num_readers; in lock_shared()
73 unsigned num_readers = __state_ & __n_readers_; in try_lock_shared()
74 if (!(__state_ & __write_entered_) && num_readers != __n_readers_) in try_lock_shared()
77 __state_ &= ~__n_readers_; in try_lock_shared()
78 __state_ |= num_readers; in try_lock_shared()
88 unsigned num_readers = (__state_ & __n_readers_) - 1; in unlock_shared()
89 __state_ &= ~__n_readers_; in unlock_shared()
90 __state_ |= num_readers; in unlock_shared()
91 if (__state_ & __write_entered_) in unlock_shared()