QSLIST: add lock-free operations
commitc740ad92d0d958fa785e5d7aa1b67ecaf30a6a54
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Dec 2014 11:05:47 +0000 (2 12:05 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 13 Jan 2015 13:43:29 +0000 (13 13:43 +0000)
tree9294b5dcdf00456ad6f8823ef7891d76ff45e003
parent6d86ae0824bdd6175dd3874688a871e981093888
QSLIST: add lock-free operations

These operations are trivial to implement and do not have ABA problems.
They are enough to implement simple multiple-producer, single consumer
lock-free lists or, as in the next patch, the multiple consumers can
steal a whole batch of elements and process them at their leisure.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1417518350-6167-5-git-send-email-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
include/qemu/queue.h