OSDN Git Service

graph-lock: Implement guard macros
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Wed, 7 Dec 2022 13:18:23 +0000 (14:18 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 15 Dec 2022 15:07:43 +0000 (16:07 +0100)
commit8aa77000c2ba8c234f72b9b4162529d02ea00188
treef76f76d8c90ad3ffe7b8734606930058a8cf6dc8
parentaead9dc9d1acc5876951885c064ec4153fbd0ed8
graph-lock: Implement guard macros

Similar to the implementation in lockable.h, implement macros to
automatically take and release the rdlock.

Create the empty GraphLockable and GraphLockableMainloop structs only to
use it as a type for G_DEFINE_AUTOPTR_CLEANUP_FUNC.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221207131838.239125-4-kwolf@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
include/block/graph-lock.h