Lines Matching refs:__state_
21 : __state_(0) in __shared_mutex_base()
31 while (__state_ & __write_entered_) in lock()
33 __state_ |= __write_entered_; in lock()
34 while (__state_ & __n_readers_) in lock()
42 if (__state_ == 0) in try_lock()
44 __state_ = __write_entered_; in try_lock()
54 __state_ = 0; in unlock()
64 while ((__state_ & __write_entered_) || (__state_ & __n_readers_) == __n_readers_) in lock_shared()
66 unsigned num_readers = (__state_ & __n_readers_) + 1; in lock_shared()
67 __state_ &= ~__n_readers_; in lock_shared()
68 __state_ |= num_readers; in lock_shared()
75 unsigned num_readers = __state_ & __n_readers_; in try_lock_shared()
76 if (!(__state_ & __write_entered_) && num_readers != __n_readers_) in try_lock_shared()
79 __state_ &= ~__n_readers_; in try_lock_shared()
80 __state_ |= num_readers; in try_lock_shared()
90 unsigned num_readers = (__state_ & __n_readers_) - 1; in unlock_shared()
91 __state_ &= ~__n_readers_; in unlock_shared()
92 __state_ |= num_readers; in unlock_shared()
93 if (__state_ & __write_entered_) in unlock_shared()