The "old_tail = q->tail, q->tail = node" assignment in wfqueue
is not type safe; q->tail is a pointer to pointer to node and the
correct value to assign is &node->next. While the arithmetic is
the same, it is better to be tidy.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* 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