commit | 88eb7c29e4320597d2f246adf731f0aac97cfbcc | [log] [tgz] |
---|---|---|
author | Stefan Hajnoczi <stefanha@redhat.com> | Thu Feb 27 11:48:41 2014 +0100 |
committer | Stefan Hajnoczi <stefanha@redhat.com> | Thu Mar 13 14:42:24 2014 +0100 |
tree | 2044aec8594d144fe48380f095110abd1bf97199 | |
parent | 48ff269272f18d2b8fa53cb08365df417588f585 [diff] |
iothread: stash thread ID away Keep the thread ID around so we can report it via QMP. There's only one problem: qemu_get_thread_id() (gettid() wrapper on Linux) must be called from the thread itself. There is no way to get the thread ID outside the thread. This patch uses a condvar to wait for iothread_run() to populate the thread_id inside the thread. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>