-/* lock/unlock one hash chain, non-blocking. This is meant to be used
- to reduce contention - it cannot guarantee how many records will be
- locked */
-_PUBLIC_ int tdb1_chainlock_nonblock(struct tdb1_context *tdb, TDB1_DATA key)
-{
- int ret = tdb1_lock_nonblock(tdb, TDB1_BUCKET(tdb->hash_fn(&key)), F_WRLCK);
- return ret;
-}
-
-/* mark a chain as locked without actually locking it. Warning! use with great caution! */
-_PUBLIC_ int tdb1_chainlock_mark(struct tdb1_context *tdb, TDB1_DATA key)
-{
- int ret = tdb1_nest_lock(tdb, lock_offset(TDB1_BUCKET(tdb->hash_fn(&key))),
- F_WRLCK, TDB1_LOCK_MARK_ONLY);
- return ret;
-}
-
-/* unmark a chain as locked without actually locking it. Warning! use with great caution! */
-_PUBLIC_ int tdb1_chainlock_unmark(struct tdb1_context *tdb, TDB1_DATA key)
-{
- return tdb1_nest_unlock(tdb, lock_offset(TDB1_BUCKET(tdb->hash_fn(&key))),
- F_WRLCK, true);
-}
-