Home | History | Annotate | Download | only in SemaCXX

Lines Matching defs:mu1

70   DoubleMutexLock(Mutex *mu1, Mutex *mu2)
71 __attribute__((exclusive_lock_function(mu1, mu2)));
930 Mutex mu1;
931 Mutex mu2 ACQUIRED_AFTER(mu1);
935 int method1(int i) SHARED_LOCKS_REQUIRED(mu2) EXCLUSIVE_LOCKS_REQUIRED(mu1);
943 int foo(int i) EXCLUSIVE_LOCKS_REQUIRED(mu2) SHARED_LOCKS_REQUIRED(mu1);
948 static int bar(int i) EXCLUSIVE_LOCKS_REQUIRED(mu1);
956 mu1.Lock();
962 mu1.Unlock();
1093 int method1(int i) SHARED_LOCKS_REQUIRED(mu1, mu, mu2);
1094 int data GUARDED_BY(mu1);
1095 Mutex *mu1;
1109 a.mu1->Lock();
1113 a.mu1->Unlock();
1225 Mutex mu1;
1228 int g GUARDED_BY(mu1);
1233 void bar() LOCKS_EXCLUDED(mu_, mu1);
1239 Mutex mu_ ACQUIRED_AFTER(mu1);
1258 mu1.Lock();
1260 mu1.Unlock();
1433 Mutex mu1, mu2, mu3;
1434 int x GUARDED_BY(mu1) GUARDED_BY(mu2);
1437 void f2() LOCKS_EXCLUDED(mu1) LOCKS_EXCLUDED(mu2) LOCKS_EXCLUDED(mu3) {
1444 void f1() EXCLUSIVE_LOCKS_REQUIRED(mu2) EXCLUSIVE_LOCKS_REQUIRED(mu1) {
1446 f2(); // expected-warning {{cannot call function 'f2' while mutex 'mu1' is held}} \
1456 // expected-warning {{calling function 'f1' requires holding mutex 'foo->mu1' exclusively}}
1500 int method1(int i) SHARED_LOCKS_REQUIRED(mu1, mu, mu2, mu3);
1501 int data GUARDED_BY(mu1);
1502 Mutex *mu1;
1513 a.method1(1); // expected-warning {{calling function 'method1' requires holding mutex 'a.mu1'}} \
1638 Mutex mu1;
1640 int a __attribute__((guarded_by(mu1)));
1646 MutexLock mulock(&mu1);
1651 ReaderMutexLock mulock1(&mu1);
1663 MutexLock mulock_a(&mu1);
1664 MutexLock mulock_b(&mu1); // \
1665 // expected-warning {{acquiring mutex 'mu1' that is already held}}
1669 MutexLock mulock1(&mu1), mulock2(&mu2);
1675 DoubleMutexLock mulock(&mu1, &mu2);
4238 Mutex mu1;
4240 int* a GUARDED_BY(mu1) PT_GUARDED_BY(mu2);
4241 Cell* c GUARDED_BY(mu1) PT_GUARDED_BY(mu2);
4242 int sa[10] GUARDED_BY(mu1);
4243 Cell sc[10] GUARDED_BY(mu1);
4246 mu1.Lock();
4254 mu1.Unlock();
4258 mu1.ReaderLock();
4272 mu1.Unlock();
4277 if (*a == 0) doSomething(); // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
4278 *a = 0; // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
4280 if (c->a == 0) doSomething(); // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4281 c->a = 0; // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4283 if ((*c).a == 0) doSomething(); // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4284 (*c).a = 0; // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4286 if (a[0] == 42) doSomething(); // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
4287 a[0] = 57; // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
4288 if (c[0].a == 42) doSomething(); // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4289 c[0].a = 57; // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4294 if (sa[0] == 42) doSomething(); // expected-warning {{reading variable 'sa' requires holding mutex 'mu1'}}
4295 sa[0] = 57; // expected-warning {{writing variable 'sa' requires holding mutex 'mu1' exclusively}}
4296 mu1'}}
4297 sc[0].a = 57; // expected-warning {{writing variable 'sc' requires holding mutex 'mu1' exclusively}}
4299 if (*sa == 42) doSomething(); // expected-warning {{reading variable 'sa' requires holding mutex 'mu1'}}
4300 *sa = 57; // expected-warning {{writing variable 'sa' requires holding mutex 'mu1' exclusively}}
4301 if ((*sc).a == 42) doSomething(); // expected-warning {{reading variable 'sc' requires holding mutex 'mu1'}}
4302 (*sc).a = 57; // expected-warning {{writing variable 'sc' requires holding mutex 'mu1' exclusively}}
4303 if (sc->a == 42) doSomething(); // expected-warning {{reading variable 'sc' requires holding mutex 'mu1'}}
4304 sc->a = 57; // expected-warning {{writing variable 'sc' requires holding mutex 'mu1' exclusively}}
4308 mu1.ReaderLock(); // OK -- correct use.
4319 mu1.Unlock();
4325 Mutex mu1;
4327 SmartPtr<int> sp GUARDED_BY(mu1) PT_GUARDED_BY(mu2);
4328 SmartPtr<Cell> sq GUARDED_BY(mu1) PT_GUARDED_BY(mu2);
4331 mu1.ReaderLock();
4343 mu1.Unlock();
4349 sp.get(); // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
4350 if (*sp == 0) doSomething(); // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
4351 *sp = 0; // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
4352 sq->a = 0; // expected-warning {{reading variable 'sq' requires holding mutex 'mu1'}}
4354 if (sp[0] == 0) doSomething(); // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
4355 sp[0] = 0; // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
4356 if (sq[0].a == 0) doSomething(); // expected-warning {{reading variable 'sq' requires holding mutex 'mu1'}}
4357 sq[0].a = 0; // expected-warning {{reading variable 'sq' requires holding mutex 'mu1'}}
4363 mu1.Lock();
4375 mu1.Unlock();
4857 Mutex mu1 ACQUIRED_BEFORE(mu2, mu3);
4862 mu1.Lock();
4868 mu1.Unlock();
4873 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu2'}}
4874 mu1.Unlock();
4880 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu3'}}
4881 mu1.Unlock();
4885 void test4() EXCLUSIVE_LOCKS_REQUIRED(mu1) {
4891 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu2'}}
4892 mu1.Unlock();
4896 mu1.AssertHeld();
4899 void test7() EXCLUSIVE_LOCKS_REQUIRED(mu1, mu2, mu3) { }
4901 void test8() EXCLUSIVE_LOCKS_REQUIRED(mu3, mu2, mu1) { }
4906 Mutex mu1;
4907 Mutex mu2 ACQUIRED_AFTER(mu1);
4908 Mutex mu3 ACQUIRED_AFTER(mu1);
4911 mu1.Lock();
4917 mu1.Unlock();
4922 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu2'}}
4923 mu1.Unlock();
4929 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu3'}}
4930 mu1.Unlock();
4937 Mutex mu1 ACQUIRED_BEFORE(mu2);
4943 mu1.Lock();
4951 mu1.Unlock();
4964 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu4'}}
4966 mu1.Unlock();
4972 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu3'}}
4974 mu1.Unlock();
4982 Mutex mu1;
4983 Mutex mu2 ACQUIRED_AFTER(mu1);
4984 Mutex mu3 ACQUIRED_AFTER(mu1);
4993 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu8'}}
4994 mu1.Unlock();
5002 Mutex mu1 ACQUIRED_BEFORE(mu2, mu3);
5013 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu8'}}
5014 mu1.Unlock();
5021 Mutex mu1 ACQUIRED_AFTER(mu3); // expected-warning {{Cycle in acquired_before/after dependencies, starting with 'mu1'}}
5022 Mutex mu2 ACQUIRED_AFTER(mu1); // expected-warning {{Cycle in acquired_before/after dependencies, starting with 'mu2'}}
5036 mu1.Lock();
5037 mu1.Unlock();
5041 mu1.Lock();
5046 mu1.Unlock();
5150 Mutex mu1;
5151 Mutex mu2 ACQUIRED_AFTER(mu1);
5155 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu2'}}
5156 mu1.Unlock();