summaryrefslogtreecommitdiff
path: root/source3/include/g_lock.h
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-02-15 16:38:43 +0100
committerVolker Lendecke <vl@samba.org>2012-04-19 22:24:19 +0200
commit1be6d849ab9d2c992dfa94419260fc28cf573d87 (patch)
tree87f20589c0b165353ff365f34b46acb9c46977af /source3/include/g_lock.h
parent1b5b38a61547a48fa7a51bdd634c880264553d36 (diff)
downloadsamba-1be6d849ab9d2c992dfa94419260fc28cf573d87.tar.gz
samba-1be6d849ab9d2c992dfa94419260fc28cf573d87.tar.bz2
samba-1be6d849ab9d2c992dfa94419260fc28cf573d87.zip
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.
Diffstat (limited to 'source3/include/g_lock.h')
-rw-r--r--source3/include/g_lock.h5
1 files changed, 0 insertions, 5 deletions
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);