Rev 119: add an explanation of how to use ctdb_lockwait() in
http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Mon Apr 16 23:14:52 GMT 2007
------------------------------------------------------------
revno: 119
revision-id: tridge at samba.org-20070416231452-7dfc1928b2b71d20
parent: tridge at samba.org-20070416231052-ba2859722685ae37
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Tue 2007-04-17 09:14:52 +1000
message:
add an explanation of how to use ctdb_lockwait()
modified:
common/ctdb_lockwait.c ctdb_lockwait.c-20070416214118-n1aeonljj3vpdd9q-1
=== modified file 'common/ctdb_lockwait.c'
--- a/common/ctdb_lockwait.c 2007-04-16 23:10:52 +0000
+++ b/common/ctdb_lockwait.c 2007-04-16 23:14:52 +0000
@@ -59,7 +59,16 @@
return 0;
}
+/*
+ setup a non-blocking chainlock on a tdb record. If this function
+ returns NULL then it could not get the chainlock. Otherwise it
+ returns a opaque handle, and will call callback() once it has
+ managed to get the chainlock. You can cancel it by using talloc_free
+ on the returned handle.
+ It is the callers responsibility to unlock the chainlock once
+ acquired
+ */
struct lockwait_handle *ctdb_lockwait(struct ctdb_db_context *ctdb_db,
TDB_DATA key,
void (*callback)(void *), void *private_data)
More information about the samba-cvs
mailing list