diff options
| author | Kevin Wolf | 2016-08-11 17:45:06 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2016-09-05 19:06:48 +0200 |
| commit | 0e438cdc932a785de72166af4641aafa103a6670 (patch) | |
| tree | 344e3bc5fde4623595a0ea77a1c9884bc8b9ef1b /include | |
| parent | qcow2: fix iovec size at qcow2_co_pwritev_compressed (diff) | |
| download | qemu-0e438cdc932a785de72166af4641aafa103a6670.tar.gz qemu-0e438cdc932a785de72166af4641aafa103a6670.tar.xz qemu-0e438cdc932a785de72166af4641aafa103a6670.zip | |
coroutine: Let CoMutex remember who holds it
In cases of deadlocks, knowing who holds a given CoMutex is really
helpful for debugging. Keeping the information around doesn't cost much
and allows us to add another assertion to keep the code correct, so
let's just add it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/qemu/coroutine.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index ac8d4c9cc8..29a20782f0 100644 --- a/include/qemu/coroutine.h +++ b/include/qemu/coroutine.h @@ -143,6 +143,7 @@ bool qemu_co_queue_empty(CoQueue *queue); */ typedef struct CoMutex { bool locked; + Coroutine *holder; CoQueue queue; } CoMutex; |
