From: bdemsky Date: Tue, 11 Jun 2019 04:39:38 +0000 (-0700) Subject: fix tabbing X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a2ea8f0f51ebbbad66ee668d69d91ed040be3881;p=c11tester.git fix tabbing --- diff --git a/test/addr-satcycle.cc b/test/addr-satcycle.cc index 0d3ba5a1..699f1938 100644 --- a/test/addr-satcycle.cc +++ b/test/addr-satcycle.cc @@ -18,7 +18,7 @@ using namespace std; atomic_int x[2], idx, y; -int r1, r2, r3; /* "local" variables */ +int r1, r2, r3; /* "local" variables */ static void a(void *obj) { diff --git a/test/condvar.cc b/test/condvar.cc index ff8feb1e..fcfd59a8 100644 --- a/test/condvar.cc +++ b/test/condvar.cc @@ -12,7 +12,7 @@ int shareddata; static void a(void *obj) { - + m->lock(); while(load_32(&shareddata)==0) v->wait(*m); diff --git a/test/insanesync.cc b/test/insanesync.cc index c0fe7f66..60fbc8dc 100644 --- a/test/insanesync.cc +++ b/test/insanesync.cc @@ -11,17 +11,17 @@ using namespace std; atomic_int x, y; atomic_intptr_t z, z2; -int r1, r2, r3; /* "local" variables */ +int r1, r2, r3; /* "local" variables */ /** - This example illustrates a self-satisfying cycle involving - synchronization. A failed synchronization creates the store that - causes the synchronization to fail. + This example illustrates a self-satisfying cycle involving + synchronization. A failed synchronization creates the store that + causes the synchronization to fail. - The C++11 memory model nominally allows r1=0, r2=1, r3=5. + The C++11 memory model nominally allows r1=0, r2=1, r3=5. - This example is insane, we don't support that behavior. -*/ + This example is insane, we don't support that behavior. + */ static void a(void *obj) diff --git a/test/iriw.cc b/test/iriw.cc index fddbf1aa..61463657 100644 --- a/test/iriw.cc +++ b/test/iriw.cc @@ -13,7 +13,7 @@ using namespace std; atomic_int x, y; -int r1, r2, r3, r4; /* "local" variables */ +int r1, r2, r3, r4; /* "local" variables */ static void a(void *obj) { diff --git a/test/iriw_wildcard.cc b/test/iriw_wildcard.cc index 5c524553..0d68b6ef 100644 --- a/test/iriw_wildcard.cc +++ b/test/iriw_wildcard.cc @@ -13,7 +13,7 @@ using namespace std; atomic_int x, y; -int r1, r2, r3, r4; /* "local" variables */ +int r1, r2, r3, r4; /* "local" variables */ static void a(void *obj) { diff --git a/test/linuxrwlocks.c b/test/linuxrwlocks.c index 7e317aa9..3d075aa8 100644 --- a/test/linuxrwlocks.c +++ b/test/linuxrwlocks.c @@ -84,7 +84,7 @@ int shareddata; static void a(void *obj) { int i; - for(i = 0; i < 2; i++) { + for(i = 0;i < 2;i++) { if ((i % 2) == 0) { read_lock(&mylock); load_32(&shareddata); diff --git a/test/linuxrwlocksyield.c b/test/linuxrwlocksyield.c index be3550e1..e3a4a605 100644 --- a/test/linuxrwlocksyield.c +++ b/test/linuxrwlocksyield.c @@ -84,7 +84,7 @@ int shareddata; static void a(void *obj) { int i; - for(i = 0; i < 2; i++) { + for(i = 0;i < 2;i++) { if ((i % 2) == 0) { read_lock(&mylock); load_32(&shareddata); diff --git a/test/mo-satcycle.cc b/test/mo-satcycle.cc index e5021612..f94f23f8 100644 --- a/test/mo-satcycle.cc +++ b/test/mo-satcycle.cc @@ -17,7 +17,7 @@ using namespace std; atomic_int x, y; -int r0, r1, r2, r3; /* "local" variables */ +int r0, r1, r2, r3; /* "local" variables */ static void a(void *obj) { diff --git a/test/nestedpromise.c b/test/nestedpromise.c index 70de8d69..9e514732 100644 --- a/test/nestedpromise.c +++ b/test/nestedpromise.c @@ -11,7 +11,7 @@ atomic_int y; atomic_int z; static void a(void *obj) { - (void)atomic_load_explicit(&z, memory_order_relaxed); // this is only for schedule control + (void)atomic_load_explicit(&z, memory_order_relaxed); // this is only for schedule control int t1=atomic_load_explicit(&x, memory_order_relaxed); atomic_store_explicit(&y, 1, memory_order_relaxed); printf("t1=%d\n",t1); diff --git a/test/rmw2prog.c b/test/rmw2prog.c index f5c3f108..e1ec2faa 100644 --- a/test/rmw2prog.c +++ b/test/rmw2prog.c @@ -20,10 +20,10 @@ static void a(void *obj) printf("expected: %d\n", expected); /* short v1 = atomic_exchange_explicit(&x, 8, memory_order_relaxed); - short v2 = atomic_exchange_explicit(&x, -10, memory_order_relaxed); - short v3 = atomic_load_explicit(&x, memory_order_relaxed); - printf("v1 = %d, v2 = %d, v3 = %d\n", v1, v2, v3); -*/ + short v2 = atomic_exchange_explicit(&x, -10, memory_order_relaxed); + short v3 = atomic_load_explicit(&x, memory_order_relaxed); + printf("v1 = %d, v2 = %d, v3 = %d\n", v1, v2, v3); + */ } static void b(void *obj) diff --git a/test/rmwprog.c b/test/rmwprog.c index ebace1ec..f515628e 100644 --- a/test/rmwprog.c +++ b/test/rmwprog.c @@ -12,7 +12,7 @@ static int N = 2; static void a(void *obj) { int i; - for (i = 0; i < N; i++) + for (i = 0;i < N;i++) atomic_fetch_add_explicit(&x, 1, memory_order_relaxed); } diff --git a/test/wrc.c b/test/wrc.c index befd23f5..21198253 100644 --- a/test/wrc.c +++ b/test/wrc.c @@ -2,13 +2,13 @@ #include #include #include "librace.h" - atomic_int x1; - atomic_int x2; - atomic_int x3; - atomic_int x4; - atomic_int x5; - atomic_int x6; - atomic_int x7; +atomic_int x1; +atomic_int x2; +atomic_int x3; +atomic_int x4; +atomic_int x5; +atomic_int x6; +atomic_int x7; static void a(void *obj) { atomic_store_explicit(&x1, 1,memory_order_relaxed); @@ -58,32 +58,32 @@ static void h(void *obj) int user_main(int argc, char **argv) { thrd_t t1, t2, t3, t4, t5, t6, t7, t8; - atomic_init(&x1, 0); - atomic_init(&x2, 0); - atomic_init(&x3, 0); - atomic_init(&x4, 0); - atomic_init(&x5, 0); - atomic_init(&x6, 0); - atomic_init(&x7, 0); + atomic_init(&x1, 0); + atomic_init(&x2, 0); + atomic_init(&x3, 0); + atomic_init(&x4, 0); + atomic_init(&x5, 0); + atomic_init(&x6, 0); + atomic_init(&x7, 0); - thrd_create(&t1, (thrd_start_t)&a, NULL); - thrd_create(&t2, (thrd_start_t)&b, NULL); - thrd_create(&t3, (thrd_start_t)&c, NULL); - thrd_create(&t4, (thrd_start_t)&d, NULL); - thrd_create(&t5, (thrd_start_t)&e, NULL); - thrd_create(&t6, (thrd_start_t)&f, NULL); - thrd_create(&t7, (thrd_start_t)&g, NULL); - thrd_create(&t8, (thrd_start_t)&h, NULL); + thrd_create(&t1, (thrd_start_t)&a, NULL); + thrd_create(&t2, (thrd_start_t)&b, NULL); + thrd_create(&t3, (thrd_start_t)&c, NULL); + thrd_create(&t4, (thrd_start_t)&d, NULL); + thrd_create(&t5, (thrd_start_t)&e, NULL); + thrd_create(&t6, (thrd_start_t)&f, NULL); + thrd_create(&t7, (thrd_start_t)&g, NULL); + thrd_create(&t8, (thrd_start_t)&h, NULL); - thrd_join(t1); - thrd_join(t2); - thrd_join(t3); - thrd_join(t4); - thrd_join(t5); - thrd_join(t6); - thrd_join(t7); - thrd_join(t8); + thrd_join(t1); + thrd_join(t2); + thrd_join(t3); + thrd_join(t4); + thrd_join(t5); + thrd_join(t6); + thrd_join(t7); + thrd_join(t8); - return 0; + return 0; } diff --git a/test/wrcs.c b/test/wrcs.c index 9728265d..ddcf4f1a 100644 --- a/test/wrcs.c +++ b/test/wrcs.c @@ -2,13 +2,13 @@ #include #include #include "librace.h" - atomic_int x1; - atomic_int x2; - atomic_int x3; - atomic_int x4; - atomic_int x5; - atomic_int x6; - atomic_int x7; +atomic_int x1; +atomic_int x2; +atomic_int x3; +atomic_int x4; +atomic_int x5; +atomic_int x6; +atomic_int x7; static void a(void *obj) { atomic_store_explicit(&x1, 1,memory_order_seq_cst); @@ -58,32 +58,32 @@ static void h(void *obj) int user_main(int argc, char **argv) { thrd_t t1, t2, t3, t4, t5, t6, t7, t8; - atomic_init(&x1, 0); - atomic_init(&x2, 0); - atomic_init(&x3, 0); - atomic_init(&x4, 0); - atomic_init(&x5, 0); - atomic_init(&x6, 0); - atomic_init(&x7, 0); + atomic_init(&x1, 0); + atomic_init(&x2, 0); + atomic_init(&x3, 0); + atomic_init(&x4, 0); + atomic_init(&x5, 0); + atomic_init(&x6, 0); + atomic_init(&x7, 0); - thrd_create(&t1, (thrd_start_t)&a, NULL); - thrd_create(&t2, (thrd_start_t)&b, NULL); - thrd_create(&t3, (thrd_start_t)&c, NULL); - thrd_create(&t4, (thrd_start_t)&d, NULL); - thrd_create(&t5, (thrd_start_t)&e, NULL); - thrd_create(&t6, (thrd_start_t)&f, NULL); - thrd_create(&t7, (thrd_start_t)&g, NULL); - thrd_create(&t8, (thrd_start_t)&h, NULL); + thrd_create(&t1, (thrd_start_t)&a, NULL); + thrd_create(&t2, (thrd_start_t)&b, NULL); + thrd_create(&t3, (thrd_start_t)&c, NULL); + thrd_create(&t4, (thrd_start_t)&d, NULL); + thrd_create(&t5, (thrd_start_t)&e, NULL); + thrd_create(&t6, (thrd_start_t)&f, NULL); + thrd_create(&t7, (thrd_start_t)&g, NULL); + thrd_create(&t8, (thrd_start_t)&h, NULL); - thrd_join(t1); - thrd_join(t2); - thrd_join(t3); - thrd_join(t4); - thrd_join(t5); - thrd_join(t6); - thrd_join(t7); - thrd_join(t8); + thrd_join(t1); + thrd_join(t2); + thrd_join(t3); + thrd_join(t4); + thrd_join(t5); + thrd_join(t6); + thrd_join(t7); + thrd_join(t8); - return 0; + return 0; }