Lines Matching refs:mu
50 Mutex mu;
51 int a GUARDED_BY(mu);
54 void baz() EXCLUSIVE_LOCKS_REQUIRED(!mu) {
55 mu.Lock();
57 mu.Unlock();
63 Mutex mu;
64 int a GUARDED_BY(mu);
68 mu.Lock(); // expected-warning {{acquiring mutex 'mu' requires negative capability '!mu'}}
69 baz(); // expected-warning {{cannot call function 'baz' while mutex 'mu' is held}}
71 mu.Unlock();
75 baz(); // expected-warning {{calling function 'baz' requires holding '!mu'}}
78 void baz() EXCLUSIVE_LOCKS_REQUIRED(!mu) {
79 mu.Lock();
81 mu.Unlock();
90 mu.Lock(); // expected-warning {{acquiring mutex 'mu' requires negative capability '!mu'}}
92 mu.Unlock();
93 baz(); // no warning -- !mu in set.
96 void test3() EXCLUSIVE_LOCKS_REQUIRED(!mu) {
97 mu.Lock();
99 mu.Unlock();
100 baz(); // no warning -- !mu in set.