2 #include "libinterface.h"
5 // atomic<struct node*> next;
9 node(int d = 0) : data(d) {
19 node* n = new node ();
28 void enqueue(int data)
30 node* n = new node(data);
31 store_64(&head->next, (uint64_t)n);
50 node* n = (node *)load_64(&t->next);
54 int data = load_64(&n->data);
63 void thread(unsigned thread_index)
65 for (int i = 0; i < 40; i++) {
66 if (0 == thread_index)
73 // RL_ASSERT(11 == d);
78 int user_main(int argc, char **argv)
84 thrd_create(&A, (thrd_start_t)&thread, (void *)0);
85 thrd_create(&B, (thrd_start_t)&thread, (void *)1);