]> Git Repo - qemu.git/commit
monitor: add lock to protect mon_fdsets
authorPeter Xu <[email protected]>
Fri, 8 Jun 2018 03:55:11 +0000 (11:55 +0800)
committerMarkus Armbruster <[email protected]>
Mon, 18 Jun 2018 13:48:22 +0000 (15:48 +0200)
commit474514668b47c9d2148b526e379ffbb6764d9a9e
tree093a62a7cd6cf125fb9987e17574c58524df3aa8
parentd32749deb61513c5456901f20e19887e1bc3d7f3
monitor: add lock to protect mon_fdsets

Introduce a new global big lock for mon_fdsets.  Take it where needed.

The monitor_fdset_get_fd() handling is a bit tricky: now we need to call
qemu_mutex_unlock() which might pollute errno, so we need to make sure
the correct errno be passed up to the callers.  To make things simpler,
we let monitor_fdset_get_fd() return the -errno directly when error
happens, then in qemu_open() we move it back into errno.

Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <20180608035511[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
monitor.c
stubs/fdset.c
util/osdep.c
This page took 0.024819 seconds and 4 git commands to generate.