From 1be6d849ab9d2c992dfa94419260fc28cf573d87 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 15 Feb 2012 16:38:43 +0100 Subject: s3-g_lock: Use dbwrap_record_watch_send/recv This simplifies the g_lock implementation. The new implementation tries to acquire a lock. If that fails due to a lock conflict, wait for the g_lock record to change. Upon change, just try again. The old logic had to cope with pending records and an ugly hack into ctdb itself. As a bonus, we now get a really clean async g_lock_lock_send/recv that can asynchronously wait for a global lock. This would have been almost impossible to do without the dbwrap_record_watch infrastructure. --- source3/include/g_lock.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source3/include') diff --git a/source3/include/g_lock.h b/source3/include/g_lock.h index f4b7809475..1ac8418922 100644 --- a/source3/include/g_lock.h +++ b/source3/include/g_lock.h @@ -29,11 +29,6 @@ enum g_lock_type { G_LOCK_WRITE = 1, }; -/* - * Or'ed with g_lock_type - */ -#define G_LOCK_PENDING (2) - struct g_lock_ctx *g_lock_ctx_init(TALLOC_CTX *mem_ctx, struct messaging_context *msg); -- cgit