1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

add an explanation of how to use ctdb_lockwait()

(This used to be ctdb commit e0c9844ea6270ff506b0b5906aa6ccfcc3bcce7a)
This commit is contained in:
Andrew Tridgell 2007-04-17 09:14:52 +10:00
parent 7db4320e84
commit a024989597

View File

@ -59,7 +59,16 @@ static int lockwait_destructor(struct lockwait_handle *h)
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)