Lines Matching defs:mu1
59 struct Mutex mu1;
60 struct Mutex mu2 ACQUIRED_AFTER(mu1);
61 struct Foo foo_ = {&mu1};
68 int Foo_fun1(int i) SHARED_LOCKS_REQUIRED(mu2) EXCLUSIVE_LOCKS_REQUIRED(mu1) {
72 int Foo_fun2(int i) EXCLUSIVE_LOCKS_REQUIRED(mu2) SHARED_LOCKS_REQUIRED(mu1) {
76 int Foo_func3(int i) LOCKS_EXCLUDED(mu1, mu2) {
80 static int Bar_fun1(int i) EXCLUSIVE_LOCKS_REQUIRED(mu1) {
110 expected-warning{{calling function 'Foo_fun1' requires holding mutex 'mu1' exclusively}}
112 mutex_exclusive_lock(&mu1); // expected-note{{mutex acquired here}}
116 mutex_shared_lock(&mu1); // expected-warning{{acquiring mutex 'mu1' that is already held}} \
117 expected-warning{{mutex 'mu1' must be acquired before 'mu2'}}
118 mutex_unlock(&mu1);
120 mutex_shared_lock(&mu1);
125 mutex_unlock(&mu1);
126 mutex_exclusive_lock(&mu1);
128 mutex_unlock(&mu1);
130 mutex_exclusive_lock(&mu1);
131 Foo_func3(4); // expected-warning{{cannot call function 'Foo_func3' while mutex 'mu1' is held}}
132 mutex_unlock(&mu1);
152 mutex_exclusive_lock(&mu1); // expected-note {{mutex acquired here}}
153 mutex_shared_unlock(&mu1); // expected-warning {{releasing mutex 'mu1' using shared access, expected exclusive access}}
155 mutex_exclusive_unlock(&mu1); // expected-warning {{releasing mutex 'mu1' that was not held}}
157 mutex_shared_lock(&mu1); // expected-note {{mutex acquired here}}
158 mutex_exclusive_unlock(&mu1); // expected-warning {{releasing mutex 'mu1' using exclusive access, expected shared access}}
160 mutex_shared_unlock(&mu1); // expected-warning {{releasing mutex 'mu1' that was not held}}
164 struct Mutex* const __attribute__((cleanup(unlock_scope))) scope = &mu1;
198 void run(void) __attribute__((guarded_by(mu1), guarded_by(mu1))); // expected-warning 2{{only applies to non-static data members and global variables}}
200 int value_with_wrong_number_of_args GUARDED_BY(mu1, mu2); // expected-error{{'guarded_by' attribute takes one argument}}
202 int *ptr_with_wrong_number_of_args PT_GUARDED_BY(mu1, mu2); // expected-error{{'pt_guarded_by' attribute takes one argument}}