diff --git a/regressions/ck_hp/validate/ck_hp_fifo_donner.c b/regressions/ck_hp/validate/ck_hp_fifo_donner.c index 0866729..759a004 100644 --- a/regressions/ck_hp/validate/ck_hp_fifo_donner.c +++ b/regressions/ck_hp/validate/ck_hp_fifo_donner.c @@ -93,7 +93,8 @@ queue_50_50(void *elements) /* start barrier */ ck_pr_inc_uint(&start_barrier); - while (ck_pr_load_uint(&start_barrier) < thread_count + 1); + while (ck_pr_load_uint(&start_barrier) < thread_count + 1) + ck_pr_stall(); /* 50/50 enqueue-dequeue */ for(j = 0; j < element_count; j++) { @@ -137,7 +138,8 @@ queue_50_50(void *elements) /* end barrier */ ck_pr_inc_uint(&end_barrier); - while (ck_pr_load_uint(&end_barrier) < thread_count + 1); + while (ck_pr_load_uint(&end_barrier) < thread_count + 1) + ck_pr_stall(); return NULL; } diff --git a/regressions/ck_hp/validate/ck_hp_stack.c b/regressions/ck_hp/validate/ck_hp_stack.c index e728e31..158ea5a 100644 --- a/regressions/ck_hp/validate/ck_hp_stack.c +++ b/regressions/ck_hp/validate/ck_hp_stack.c @@ -95,7 +95,8 @@ thread(void *unused CK_CC_UNUSED) } ck_pr_inc_uint(&barrier); - while (ck_pr_load_uint(&barrier) < n_threads); + while (ck_pr_load_uint(&barrier) < n_threads) + ck_pr_stall(); for (i = 0; i < PAIRS; i++) { ck_hp_stack_push_mpmc(&stack, &entry[i]->stack_entry); @@ -105,7 +106,8 @@ thread(void *unused CK_CC_UNUSED) } ck_pr_inc_uint(&e_barrier); - while (ck_pr_load_uint(&e_barrier) < n_threads); + while (ck_pr_load_uint(&e_barrier) < n_threads) + ck_pr_stall(); fprintf(stderr, "Peak: %u (%2.2f%%)\nReclamations: %" PRIu64 "\n\n", record.n_peak, diff --git a/regressions/ck_pr/validate/Makefile b/regressions/ck_pr/validate/Makefile index e4706d0..c255b03 100644 --- a/regressions/ck_pr/validate/Makefile +++ b/regressions/ck_pr/validate/Makefile @@ -81,3 +81,4 @@ clean: rm -rf *~ *.o $(OBJECTS) *.dSYM include ../../../build/regressions.build +CFLAGS+=-D_GNU_SOURCE diff --git a/regressions/ck_pr/validate/ck_pr_store.c b/regressions/ck_pr/validate/ck_pr_store.c index de886d7..077851b 100644 --- a/regressions/ck_pr/validate/ck_pr_store.c +++ b/regressions/ck_pr/validate/ck_pr_store.c @@ -24,6 +24,9 @@ * SUCH DAMAGE. */ +#include "../../common.h" +#include + #include #include #include @@ -31,9 +34,6 @@ #include #include -#include -#include "../../common.h" - #ifndef R_REPEAT #define R_REPEAT 200000 #endif diff --git a/regressions/common.h b/regressions/common.h index acc484f..b756a41 100644 --- a/regressions/common.h +++ b/regressions/common.h @@ -27,6 +27,7 @@ #include #include #include +#include #include #ifdef __linux__