Lines Matching refs:mu1
45 struct Mutex mu1;
46 struct Mutex mu2 ACQUIRED_AFTER(mu1);
47 struct Foo foo_ = {&mu1};
54 int Foo_fun1(int i) SHARED_LOCKS_REQUIRED(mu2) EXCLUSIVE_LOCKS_REQUIRED(mu1) {
58 int Foo_fun2(int i) EXCLUSIVE_LOCKS_REQUIRED(mu2) SHARED_LOCKS_REQUIRED(mu1) {
62 int Foo_func3(int i) LOCKS_EXCLUDED(mu1, mu2) {
66 static int Bar_fun1(int i) EXCLUSIVE_LOCKS_REQUIRED(mu1) {
81 expected-warning{{calling function 'Foo_fun1' requires exclusive lock on 'mu1'}}
83 mutex_exclusive_lock(&mu1);
87 mutex_shared_lock(&mu1); // expected-warning{{locking 'mu1' that is already locked}}
88 mutex_unlock(&mu1);
90 mutex_shared_lock(&mu1);
95 mutex_unlock(&mu1);
96 mutex_exclusive_lock(&mu1);
98 mutex_unlock(&mu1);
100 mutex_exclusive_lock(&mu1);
101 Foo_func3(4); // expected-warning{{cannot call function 'Foo_func3' while mutex 'mu1' is locked}}
102 mutex_unlock(&mu1);