X-Git-Url: http://plrg.eecs.uci.edu/git/?p=cdsspec-compiler.git;a=blobdiff_plain;f=benchmark%2Fmpmc-queue%2Fmpmc-queue.cc;h=39c2c0a24808a3ce62b05a47b66b11f0445d198e;hp=3a19045a65f5f935446f077ca8337a2ea5581e8c;hb=903198262494ab58a885eed90d6310ea7ec917ac;hpb=87592b00015f3b76290f431684129440dec01152 diff --git a/benchmark/mpmc-queue/mpmc-queue.cc b/benchmark/mpmc-queue/mpmc-queue.cc index 3a19045..39c2c0a 100644 --- a/benchmark/mpmc-queue/mpmc-queue.cc +++ b/benchmark/mpmc-queue/mpmc-queue.cc @@ -11,7 +11,7 @@ void threadA(struct mpmc_boundq_1_alt *queue) { int32_t *bin = queue->write_prepare(); - store_32(bin, 1); + //store_32(bin, 1); *bin = 1; printf("write_bin %d, val %d\n", bin, 1); queue->write_publish(bin); @@ -21,8 +21,8 @@ void threadB(struct mpmc_boundq_1_alt *queue) { int32_t *bin; while (bin = queue->read_fetch()) { - printf("Read: %d\n", load_32(bin)); - printf("read_bin %d, val %d\n", bin, load_32(bin)); + //printf("Read: %d\n", load_32(bin)); + //printf("read_bin %d, val %d\n", bin, load_32(bin)); printf("Read: %d\n", *bin); queue->read_consume(bin); } @@ -31,12 +31,12 @@ void threadB(struct mpmc_boundq_1_alt *queue) void threadC(struct mpmc_boundq_1_alt *queue) { int32_t *bin = queue->write_prepare(); - store_32(bin, 1); + //store_32(bin, 1); *bin = 1; queue->write_publish(bin); while (bin = queue->read_fetch()) { - printf("Read: %d\n", load_32(bin)); + //printf("Read: %d\n", load_32(bin)); printf("Read: %d\n", *bin); queue->read_consume(bin); } @@ -119,7 +119,7 @@ int user_main(int argc, char **argv) #ifndef CONFIG_MPMC_NO_INITIAL_ELEMENT printf("Adding initial element\n"); int32_t *bin = queue.write_prepare(); - store_32(bin, 17); + //store_32(bin, 17); *bin, 17; printf("init_write_bin %d, val %d\n", bin, 17); queue.write_publish(bin);