@Label: Enqueue_Clear
@End
*/
- /**** detected UL ****/
+ /**** UL & inadmissible ****/
tail = atomic_load_explicit(&q->tail, acquire);
/****FIXME: miss ****/
next = atomic_load_explicit(&q->nodes[get_ptr(tail)].next, acquire);
if (get_ptr(next) == 0) { // == NULL
pointer value = MAKE_POINTER(node, get_count(next) + 1);
- /**** detected UL ****/
+ /**** SPEC Error (testcase1.c) ****/
// Second release can be just relaxed
success = atomic_compare_exchange_strong_explicit(&q->nodes[get_ptr(tail)].next,
&next, value, release, relaxed);
}
if (!success) {
// This routine helps the other enqueue to update the tail
- /**** detected UL ****/
+ /**** UL & Inadmissible ****/
unsigned int ptr = get_ptr(atomic_load_explicit(&q->nodes[get_ptr(tail)].next, acquire));
pointer value = MAKE_POINTER(ptr,
get_count(tail) + 1);
- /****FIXME: miss ****/
+ /**** SPEC (sequential, testcase2.c) ****/
// Second release can be just relaxed
bool succ = false;
succ = atomic_compare_exchange_strong_explicit(&q->tail,
- &tail, value, release, relaxed);
+ &tail, value, relaxed, relaxed);
if (succ) {
//printf("miss2_enqueue CAS succ\n");
}
}
}
}
- /**** dectected UL ****/
+ /**** UL & Inadmissible ****/
// Second release can be just relaxed
bool succ = atomic_compare_exchange_strong_explicit(&q->tail,
&tail,
@Label: Dequeue_Clear
@End
*/
- /**** detected correctness error ****/
+ /**** Inadmissible ****/
head = atomic_load_explicit(&q->head, acquire);
/**
@Begin
* relaxed (it introduces a bug when there's two dequeuers and one
* enqueuer) correctness bug!!
*/
+ /**** SPEC (sequential) (testcase1.c) ****/
+ /**** New bug ****/
tail = atomic_load_explicit(&q->tail, acquire);
- /**** Detected UL/DR (testcase1.c) ****/
+ /**** SPEC Error (testcase1.c) ****/
next = atomic_load_explicit(&q->nodes[get_ptr(head)].next, acquire);
/**
@Begin
if (get_ptr(next) == 0) { // NULL
return false; // NULL
}
- /**** Detected UL (testcase1.c) ****/
+ /**** SPEC (sequential testcase3.c) ****/
// Second release can be just relaxed
bool succ = false;
succ = atomic_compare_exchange_strong_explicit(&q->tail,
&tail,
MAKE_POINTER(get_ptr(next), get_count(tail) + 1),
- release, relaxed);
+ release, relaxed);
if (succ) {
//printf("miss4_dequeue CAS succ\n");
}
} else {
//value = load_32(&q->nodes[get_ptr(next)].value);
value = q->nodes[get_ptr(next)].value;
- /**** correctness error ****/
+ /**** inadmissibility ****/
success = atomic_compare_exchange_strong_explicit(&q->head,
&head,
MAKE_POINTER(get_ptr(next), get_count(head) + 1),