Lines Matching +full:rw +full:- +full:p
1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
12 static NOINLINE void access(volatile void *p, int sz, int rw) { in access() argument
13 if (rw) { in access()
15 case 0: __sanitizer_unaligned_store16((void *)p, 0); break; in access()
16 case 1: __sanitizer_unaligned_store32((void *)p, 0); break; in access()
17 case 2: __sanitizer_unaligned_store64((void *)p, 0); break; in access()
22 case 0: __sanitizer_unaligned_load16((void *)p); break; in access()
23 case 1: __sanitizer_unaligned_load32((void *)p); break; in access()
24 case 2: __sanitizer_unaligned_load64((void *)p); break; in access()
40 static NOINLINE void access3(bool main, int sz1, bool rw, volatile char *p) { in access3() argument
41 p += off; in access3()
43 access(p, sz1, true); in access3()
45 p += off2; in access3()
46 if (rw) { in access3()
47 *p = 42; in access3()
49 if (*p == 42) in access3()
57 access2(bool main, int sz1, int off2, bool rw, volatile char *obj) { in access2() argument
59 access3<off, 0>(main, sz1, rw, obj); in access2()
61 access3<off, 1>(main, sz1, rw, obj); in access2()
63 access3<off, 2>(main, sz1, rw, obj); in access2()
65 access3<off, 3>(main, sz1, rw, obj); in access2()
67 access3<off, 4>(main, sz1, rw, obj); in access2()
69 access3<off, 5>(main, sz1, rw, obj); in access2()
71 access3<off, 6>(main, sz1, rw, obj); in access2()
73 access3<off, 7>(main, sz1, rw, obj); in access2()
77 access1(bool main, int off, int sz1, int off2, bool rw, char *obj) { in access1() argument
79 access2<0>(main, sz1, off2, rw, obj); in access1()
81 access2<1>(main, sz1, off2, rw, obj); in access1()
83 access2<2>(main, sz1, off2, rw, obj); in access1()
85 access2<3>(main, sz1, off2, rw, obj); in access1()
87 access2<4>(main, sz1, off2, rw, obj); in access1()
89 access2<5>(main, sz1, off2, rw, obj); in access1()
91 access2<6>(main, sz1, off2, rw, obj); in access1()
93 access2<7>(main, sz1, off2, rw, obj); in access1()
101 for (int rw = 0; rw < 2; rw++) { in Test() local
102 // printf("thr=%d off=%d sz1=%d off2=%d rw=%d p=%p\n", in Test()
103 // main, off, sz1, off2, rw, obj); in Test()
104 access1(main, off, sz1, off2, rw, (char*)obj); in Test()
112 void *Thread(void *p) { in Thread() argument
113 (void)p; in Thread()