Merge branch 'master' of git.concurrencykit.org:ck

ck_pring
Samy Al Bahra 12 years ago
commit 026bdd392f

@ -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;
}

@ -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,

@ -81,3 +81,4 @@ clean:
rm -rf *~ *.o $(OBJECTS) *.dSYM
include ../../../build/regressions.build
CFLAGS+=-D_GNU_SOURCE

@ -24,6 +24,9 @@
* SUCH DAMAGE.
*/
#include "../../common.h"
#include <ck_pr.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
@ -31,9 +34,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <ck_pr.h>
#include "../../common.h"
#ifndef R_REPEAT
#define R_REPEAT 200000
#endif

@ -27,6 +27,7 @@
#include <ck_cc.h>
#include <ck_pr.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef __linux__

Loading…
Cancel
Save