regressions/ck_hp: LLVM's optimizer keeps getting the best of us.

If I see more regressions in LLVM, I may end up enforcing compiler
barriers in all inlined code.
ck_pring
Samy Al Bahra 13 years ago
parent bc19dccb1f
commit f8c19a89b4

@ -81,12 +81,17 @@ test(void *c)
entry->tid = context->tid;
ck_hp_fifo_enqueue_mpmc(&record, &fifo, fifo_entry, entry);
CK_CC_BARRIER();
fifo_entry = ck_hp_fifo_dequeue_mpmc(&record, &fifo, &entry);
if (fifo_entry == NULL) {
fprintf(stderr, "ERROR [%u] Queue should never be empty.\n", context->tid);
pause();
exit(EXIT_FAILURE);
}
CK_CC_BARRIER();
if (entry->tid < 0 || entry->tid >= nthr) {
fprintf(stderr, "ERROR [%u] Incorrect value in entry.\n", entry->tid);
exit(EXIT_FAILURE);

Loading…
Cancel
Save