Re: [Qemu-devel] [PATCH v2 1/2] iothread: stash thread ID away

2014-02-27 Thread Stefan Hajnoczi
On Tue, Feb 25, 2014 at 10:33:49AM -0700, Eric Blake wrote: > On 02/25/2014 10:19 AM, Stefan Hajnoczi wrote: > > 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. The

Re: [Qemu-devel] [PATCH v2 1/2] iothread: stash thread ID away

2014-02-25 Thread Eric Blake
On 02/25/2014 10:19 AM, Stefan Hajnoczi wrote: > 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 patc

[Qemu-devel] [PATCH v2 1/2] iothread: stash thread ID away

2014-02-25 Thread Stefan Hajnoczi
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 t