[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v9 7/7] monitor: add lock to protect mon_fdsets
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v9 7/7] monitor: add lock to protect mon_fdsets |
Date: |
Wed, 30 May 2018 17:39:37 +0100 |
User-agent: |
Mutt/1.9.5 (2018-04-13) |
On Tue, May 29, 2018 at 01:57:55PM +0800, Peter Xu wrote:
> 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.
>
> Signed-off-by: Peter Xu <address@hidden>
> ---
> monitor.c | 52 +++++++++++++++++++++++++++++++++++++++++----------
> stubs/fdset.c | 2 +-
> util/osdep.c | 3 ++-
> 3 files changed, 45 insertions(+), 12 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH v9 2/7] monitor: protect mon->fds with mon_lock, (continued)
- [Qemu-devel] [PATCH v9 2/7] monitor: protect mon->fds with mon_lock, Peter Xu, 2018/05/29
- [Qemu-devel] [PATCH v9 3/7] monitor: more comments on lock-free elements, Peter Xu, 2018/05/29
- [Qemu-devel] [PATCH v9 4/7] monitor: fix comment for monitor_lock, Peter Xu, 2018/05/29
- [Qemu-devel] [PATCH v9 5/7] monitor: remove event_clock_type, Peter Xu, 2018/05/29
- [Qemu-devel] [PATCH v9 6/7] monitor: move init global earlier, Peter Xu, 2018/05/29
- [Qemu-devel] [PATCH v9 7/7] monitor: add lock to protect mon_fdsets, Peter Xu, 2018/05/29
- Re: [Qemu-devel] [PATCH v9 7/7] monitor: add lock to protect mon_fdsets,
Stefan Hajnoczi <=