lib: Add g_lock_watch_data_send/recv()
authorVolker Lendecke <vl@samba.org>
Wed, 30 Oct 2019 15:12:11 +0000 (16:12 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 15 May 2020 00:48:32 +0000 (00:48 +0000)
commit46e8e0cd7eb69e2c8ee9b65491e198134fab1b61
tree9a2f65fbaf88516bdf1ca591fec61186b0717ef2
parent66d62ed7978cc0bc1d7bb6c495e32738802f4420
lib: Add g_lock_watch_data_send/recv()

Same concept as dbwrap_watched_watch_send/recv: Get informed if the
underlying data of a record changes. This utilizes the watched
database that g_lock is based upon anyway. To avoid spurious wakeups
by pure g_lock operations this patch adds a sequence number for the
data that is stored in the g_lock data field.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/g_lock.h
source3/lib/g_lock.c