Lines Matching defs:mu
45 Mutex mu;
46 int a GUARDED_BY(mu); // expected-note3 {{Guarded_by declared here.}}
48 void foo1() EXCLUSIVE_LOCKS_REQUIRED(mu);
49 void foo2() SHARED_LOCKS_REQUIRED(mu);
50 void foo3() LOCKS_EXCLUDED(mu);
53 a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu' exclusively}}
57 int b = a; // expected-warning {{reading variable 'a' requires holding mutex 'mu'}}
61 foo1(); // expected-warning {{calling function 'foo1' requires holding mutex 'mu' exclusively}}
65 foo2(); // expected-warning {{calling function 'foo2' requires holding mutex 'mu'}}
69 mu.ReaderLock();
70 foo1(); // expected-warning {{calling function 'foo1' requires holding mutex 'mu' exclusively}}
71 mu.Unlock();
75 mu.ReaderLock();
76 a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu' exclusively}}
77 mu.Unlock();
81 mu.Lock();
82 foo3(); // expected-warning {{cannot call function 'foo3' while mutex 'mu' is held}}
83 mu.Unlock();