OSDN Git Service

coroutine: Add qemu_co_mutex_assert_locked()
authorKevin Wolf <kwolf@redhat.com>
Thu, 24 Oct 2019 14:26:57 +0000 (16:26 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 25 Oct 2019 13:18:38 +0000 (15:18 +0200)
commit944f3d5dd216fcd8cb007eddd4f82dced0a15b3d
treed8befdc71c3b232d96476c60dd9ec2468dbc2b9d
parentc9b749d7bcaf035de4dc32cd6225a2ff51200d7b
coroutine: Add qemu_co_mutex_assert_locked()

Some functions require that the caller holds a certain CoMutex for them
to operate correctly. Add a function so that they can assert the lock is
really held.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Tested-by: Michael Weiser <michael.weiser@gmx.de>
Reviewed-by: Michael Weiser <michael.weiser@gmx.de>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Max Reitz <mreitz@redhat.com>
include/qemu/coroutine.h