lib/tdb: Add/expose lock functions to support CTDB
authorAmitay Isaacs <amitay@gmail.com>
Mon, 26 Mar 2012 22:44:33 +0000 (09:44 +1100)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 29 Mar 2012 09:37:03 +0000 (20:07 +1030)
commit3fdeaa3992bb0599613e20d8e3248c478897531f
tree55cb725d21582c13841697c092559e72809b7562
parentf74ae3257a2edb9756d9f0442c1314306e936759
lib/tdb: Add/expose lock functions to support CTDB

This patch adds two lock functions used by CTDB to perform asynchronous
locking. These functions do not actually perform any fcntl operations,
but only increment internal counters.

 - tdb_transaction_write_lock_mark()
 - tdb_transaction_write_lock_unmark()

It also exposes two internal functions
 - tdb_lock_nonblock()
 - tdb_unlock()

These functions are NOT exposed in include/tdb.h to prevent any further
uses of these functions. If you ever need to use these functions, consider
using tdb2.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
lib/tdb/common/lock.c