diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2015-02-02 19:36:02 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2015-02-02 19:36:02 +0000 |
| commit | d5fbb4c9ed52d97aebe5994d8a857c74c0d95a92 (patch) | |
| tree | 46ddd11a5abcfaa68db676948ecf83303d153cfd /include/qemu/queue.h | |
| parent | 16017c48547960539fcadb1f91d252124f442482 (diff) | |
| parent | 2aeba9d8a1b6121b98948fcd42fd2aa32f68b750 (diff) | |
| download | focaccia-qemu-d5fbb4c9ed52d97aebe5994d8a857c74c0d95a92.tar.gz focaccia-qemu-d5fbb4c9ed52d97aebe5994d8a857c74c0d95a92.zip | |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
The important bits here are the first part of RCU. v1->v2 changes are the new qemu-thread patch to fix Mac OS X, and cleaning up warnings. v2->v3 removed the patch to enable modules by default. # gpg: Signature made Mon 02 Feb 2015 19:28:03 GMT using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: scsi: Fix scsi_req_cancel_async for no aiocb req cpu-exec: simplify init_delay_params cpu-exec: simplify align_clocks memory: avoid ref/unref in memory_region_find memory: protect current_map by RCU memory: remove assertion on memory_region_destroy rcu: add call_rcu rcu: allow nesting of rcu_read_lock/rcu_read_unlock rcu: add rcutorture rcu: add rcu library qemu-thread: fix qemu_event without futexes Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/qemu/queue.h')
| -rw-r--r-- | include/qemu/queue.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/qemu/queue.h b/include/qemu/queue.h index a98eb3ad79..c602797652 100644 --- a/include/qemu/queue.h +++ b/include/qemu/queue.h @@ -104,6 +104,19 @@ struct { \ (head)->lh_first = NULL; \ } while (/*CONSTCOND*/0) +#define QLIST_SWAP(dstlist, srclist, field) do { \ + void *tmplist; \ + tmplist = (srclist)->lh_first; \ + (srclist)->lh_first = (dstlist)->lh_first; \ + if ((srclist)->lh_first != NULL) { \ + (srclist)->lh_first->field.le_prev = &(srclist)->lh_first; \ + } \ + (dstlist)->lh_first = tmplist; \ + if ((dstlist)->lh_first != NULL) { \ + (dstlist)->lh_first->field.le_prev = &(dstlist)->lh_first; \ + } \ +} while (/*CONSTCOND*/0) + #define QLIST_INSERT_AFTER(listelm, elm, field) do { \ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ (listelm)->field.le_next->field.le_prev = \ |