Lines Matching full:sls_mu
98 Mutex sls_mu;
100 Mutex sls_mu2 __attribute__((acquired_after(sls_mu)));
102 int sls_guardby_var __attribute__((guarded_by(sls_mu))) = 0;
122 sls_mu.Lock();
124 sls_mu.Unlock();
128 sls_mu.Lock();
130 sls_mu.Unlock();
140 sls_mu.Lock();
142 sls_mu.Unlock();
146 sls_mu.Lock();
148 sls_mu.Unlock();
152 sls_mu.Lock();
155 sls_mu.Unlock();
159 sls_mu.Lock();
161 sls_mu.Unlock();
163 sls_mu.Unlock();
168 sls_mu.Lock();
170 sls_mu.Lock();
171 sls_mu.Unlock();
176 sls_mu.Lock();
183 sls_mu.Lock();
185 sls_mu.Unlock();
189 sls_mu.Lock();
191 sls_mu.Unlock();
194 sls_mu.Lock();
198 sls_mu.Lock();
200 sls_mu.Unlock();
209 sls_mu.Unlock(); // \
210 // expected-warning{{unlocking 'sls_mu' that was not locked}}
214 sls_mu.Lock();
215 sls_mu.Lock(); // \
216 // expected-warning{{locking 'sls_mu' that is already locked}}
217 sls_mu.Unlock();
221 sls_mu.Lock(); // expected-note {{mutex acquired here}}
222 } // expected-warning{{mutex 'sls_mu' is still locked at the end of function}}
226 sls_mu.Lock(); // expected-note{{mutex acquired here}}
229 } // expected-warning{{mutex 'sls_mu' is not locked on every path through here}} \
233 sls_mu.Lock(); // expected-note {{mutex acquired here}}
235 sls_mu.Unlock();
236 } // expected-warning{{mutex 'sls_mu' is not locked on every path through here}}
240 sls_mu.Lock(); // expected-note {{mutex acquired here}}
248 sls_mu.Unlock(); // \
249 expected-warning{{mutex 'sls_mu' is not locked on every path through here}}\
250 expected-warning{{unlocking 'sls_mu' that was not locked}}
254 sls_mu.Lock();
256 sls_mu.Unlock();
260 expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
263 sls_mu.Lock(); // expected-note {{mutex acquired here}}
265 sls_mu.Unlock();
269 sls_mu.Lock(); // expected-note{{mutex acquired here}}
272 sls_mu.Unlock(); // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
278 sls_mu.Lock(); // \
279 // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}} \
282 sls_mu.Unlock();
286 sls_mu.Lock(); // expected-note 2{{mutex acquired here}}
287 while(getBool()) { // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
288 sls_mu.Unlock();
290 } // expected-warning{{mutex 'sls_mu' is still locked at the end of function}}
294 expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
295 sls_mu.Lock(); // expected-note {{mutex acquired here}}
297 sls_mu.Unlock(); // \
298 // expected-warning{{unlocking 'sls_mu' that was not locked}}
302 sls_mu.Lock(); // expected-note {{mutex acquired here}}
304 sls_mu.Unlock();
307 break; // expected-warning{{mutex 'sls_mu' is not locked on every path through here}}
310 sls_mu.Lock();
312 sls_mu.Unlock();
379 int *pgb_var __attribute__((pt_guarded_by(sls_mu)));
385 __attribute__((pt_guarded_by(sls_mu)));
390 // expected-warning {{writing the value pointed to by 'pgb_field' requires locking 'sls_mu' exclusively}}
392 // expected-warning {{reading the value pointed to by 'pgb_field' requires locking 'sls_mu'}}
394 // expected-warning {{writing the value pointed to by 'pgb_field' requires locking 'sls_mu' exclusively}}
400 int gb_field __attribute__((guarded_by(sls_mu)));
404 // expected-warning {{writing variable 'gb_field' requires locking 'sls_mu' exclusively}}
412 GBFoo GlobalGBFoo __attribute__((guarded_by(sls_mu)));
415 sls_mu.Lock();
417 sls_mu.Unlock();
421 sls_mu.Lock();
423 sls_mu.Unlock();
447 // expected-warning {{writing variable 'sls_guardby_var' requires locking 'sls_mu' exclusively}}
452 // expected-warning {{reading variable 'sls_guardby_var' requires locking 'sls_mu'}}
467 // expected-warning {{writing the value pointed to by 'pgb_var' requires locking 'sls_mu' exclusively}}
472 // expected-warning {{reading the value pointed to by 'pgb_var' requires locking 'sls_mu'}}
478 // expected-warning {{writing variable 'gb_field' requires locking 'sls_mu'}}
600 sls_mu.Lock();
602 sls_mu.Unlock();
603 sls_mu.Lock();
605 sls_mu.Unlock();
609 sls_mu.ReaderLock(); // \
610 // expected-warning {{mutex 'sls_mu' is locked exclusively and shared in the same scope}}
612 sls_mu.Unlock();
613 sls_mu.Lock(); // \
614 // expected-note {{the other lock of mutex 'sls_mu' is here}}
616 sls_mu.Unlock();
621 sls_mu.Lock();
623 sls_mu.Lock();
625 sls_mu.Unlock();
630 sls_mu.ReaderLock();
632 sls_mu.ReaderLock();
634 sls_mu.Unlock();
639 sls_mu.Lock(); // \
640 // expected-warning {{mutex 'sls_mu' is locked exclusively and shared in the same scope}}
642 sls_mu.ReaderLock(); // \
643 // expected-note {{the other lock of mutex 'sls_mu' is here}}
644 sls_mu.Unlock();
648 sls_mu.Lock(); // \
649 // expected-warning {{mutex 'sls_mu' is locked exclusively and shared in the same scope}}
651 sls_mu.Unlock();
652 sls_mu.ReaderLock(); // \
653 // expected-note {{the other lock of mutex 'sls_mu' is here}}
655 sls_mu.Unlock();
660 sls_mu.Lock(); // \
661 // expected-warning {{mutex 'sls_mu' is locked exclusively and shared in the same scope}}
663 sls_mu.ReaderLock(); // \
664 // expected-note {{the other lock of mutex 'sls_mu' is here}}
666 sls_mu.Unlock();
671 sls_mu.ReaderLock(); // \
672 // expected-warning {{mutex 'sls_mu' is locked exclusively and shared in the same scope}}
674 sls_mu.Lock(); // \
675 // expected-note {{the other lock of mutex 'sls_mu' is here}}
677 sls_mu.Unlock();
685 void le_fun() __attribute__((locks_excluded(sls_mu)));
690 void test() __attribute__((exclusive_locks_required(sls_mu)));
694 void elr_fun() __attribute__((exclusive_locks_required(sls_mu)));
719 sls_mu.Lock();
721 sls_mu.Unlock();
741 sls_mu.Lock();
743 sls_mu.Unlock();
781 // expected-warning {{calling function 'test' requires exclusive lock on 'sls_mu'}}
790 sls_mu.ReaderLock();
792 // expected-warning {{calling function 'test' requires exclusive lock on 'sls_mu'}}
793 sls_mu.Unlock();
797 sls_mu.Lock();
799 // expected-warning {{cannot call function 'le_fun' while mutex 'sls_mu' is locked}}
800 sls_mu.Unlock();
804 sls_mu.ReaderLock();
806 // expected-warning {{cannot call function 'le_fun' while mutex 'sls_mu' is locked}}
807 sls_mu.Unlock();