Home | History | Annotate | Download | only in Sema

Lines Matching refs:mu1

42 struct Mutex mu1;
43 struct Mutex mu2 ACQUIRED_AFTER(mu1);
44 struct Foo foo_ = {&mu1};
51 int Foo_fun1(int i) SHARED_LOCKS_REQUIRED(mu2) EXCLUSIVE_LOCKS_REQUIRED(mu1) {
55 int Foo_fun2(int i) EXCLUSIVE_LOCKS_REQUIRED(mu2) SHARED_LOCKS_REQUIRED(mu1) {
59 int Foo_func3(int i) LOCKS_EXCLUDED(mu1, mu2) {
63 static int Bar_fun1(int i) EXCLUSIVE_LOCKS_REQUIRED(mu1) {
78 expected-warning{{calling function 'Foo_fun1' requires holding mutex 'mu1' exclusively}}
80 mutex_exclusive_lock(&mu1);
84 mutex_shared_lock(&mu1); // expected-warning{{acquiring mutex 'mu1' that is already held}} \
85 expected-warning{{mutex 'mu1' must be acquired before 'mu2'}}
86 mutex_unlock(&mu1);
88 mutex_shared_lock(&mu1);
93 mutex_unlock(&mu1);
94 mutex_exclusive_lock(&mu1);
96 mutex_unlock(&mu1);
98 mutex_exclusive_lock(&mu1);
99 Foo_func3(4); // expected-warning{{cannot call function 'Foo_func3' while mutex 'mu1' is held}}
100 mutex_unlock(&mu1);
120 mutex_exclusive_lock(&mu1);
121 mutex_shared_unlock(&mu1); // expected-warning {{releasing mutex 'mu1' using shared access, expected exclusive access}}
122 mutex_exclusive_unlock(&mu1); // expected-warning {{releasing mutex 'mu1' that was not held}}
124 mutex_shared_lock(&mu1);
125 mutex_exclusive_unlock(&mu1); // expected-warning {{releasing mutex 'mu1' using exclusive access, expected shared access}}
126 mutex_shared_unlock(&mu1); // expected-warning {{releasing mutex 'mu1' that was not held}}