mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 19:18:23 +00:00
coroutine: use QSIMPLEQ instead of QTAILQ
CoQueue do not need to remove any element but the head of the list; processing is always strictly FIFO. Therefore, the simpler singly-linked QSIMPLEQ can be used instead. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
committed by
Kevin Wolf
parent
5af7045bd0
commit
7d9c858137
@@ -41,8 +41,8 @@ struct Coroutine {
|
||||
QSLIST_ENTRY(Coroutine) pool_next;
|
||||
|
||||
/* Coroutines that should be woken up when we yield or terminate */
|
||||
QTAILQ_HEAD(, Coroutine) co_queue_wakeup;
|
||||
QTAILQ_ENTRY(Coroutine) co_queue_next;
|
||||
QSIMPLEQ_HEAD(, Coroutine) co_queue_wakeup;
|
||||
QSIMPLEQ_ENTRY(Coroutine) co_queue_next;
|
||||
};
|
||||
|
||||
Coroutine *qemu_coroutine_new(void);
|
||||
|
||||
Reference in New Issue
Block a user