#include <assert.h>
#include <poll.h>
#include <urcu/compiler.h>
-#include <urcu/uatomic_arch.h>
+#include <urcu/uatomic.h>
#ifdef __cplusplus
extern "C" {
* structure containing node and setting node->next to NULL before
* publication.
*/
- old_tail = uatomic_xchg(&q->tail, node);
+ old_tail = uatomic_xchg(&q->tail, &node->next);
/*
* At this point, dequeuers see a NULL old_tail->next, which indicates
* that the queue is being appended to. The following store will append