|
|
|
@ -92,6 +92,24 @@ test(void *c)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < ITERATIONS; i++) {
|
|
|
|
|
for (j = 0; j < size; j++) {
|
|
|
|
|
fifo_entry = malloc(sizeof(ck_fifo_mpmc_entry_t));
|
|
|
|
|
entry = malloc(sizeof(struct entry));
|
|
|
|
|
entry->tid = context->tid;
|
|
|
|
|
while (ck_fifo_mpmc_tryenqueue(&fifo, fifo_entry, entry) == false)
|
|
|
|
|
ck_pr_stall();
|
|
|
|
|
|
|
|
|
|
while (ck_fifo_mpmc_trydequeue(&fifo, &entry, &garbage) == false)
|
|
|
|
|
ck_pr_stall();
|
|
|
|
|
|
|
|
|
|
if (entry->tid < 0 || entry->tid >= nthr) {
|
|
|
|
|
fprintf(stderr, "ERROR [%u] Incorrect value in entry when using try interface.\n", entry->tid);
|
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
return (NULL);
|
|
|
|
|