]> git.proxmox.com Git - mirror_qemu.git/commit
iothread: push gcontext earlier in the thread_fn
authorPeter Xu <peterx@redhat.com>
Wed, 6 Mar 2019 11:55:31 +0000 (19:55 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 8 Mar 2019 10:20:23 +0000 (10:20 +0000)
commitb60ec76a13b0d2cd06b4a681f025c180f4dd79a1
treeb33cdec75d751f9ed39a739519aa0365f64ab171
parent0bd2d233c628dcfcd2b24b7b7f59e8fcd2dcbae3
iothread: push gcontext earlier in the thread_fn

We were pushing the context until right before running the gmainloop.
Now since we have everything unconditionally, we can move this
earlier.

One benefit is that now it's done even before init_done_sem, so as
long as the iothread user calls iothread_create() and completes, we
know that the thread stack is ready.

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-id: 20190306115532.23025-5-peterx@redhat.com
Message-Id: <20190306115532.23025-5-peterx@redhat.com>

[Tweaked comment wording as discussed with Peter Xu.
--Stefan]

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
iothread.c