}
/* FIXME: Temporary cast. */
- tdb->file->allrecord_lock.owner = (void *)(struct tdb1_context *)tdb;
+ tdb->file->allrecord_lock.owner = (void *)(struct tdb_context *)tdb;
tdb->file->allrecord_lock.count = 1;
/* If it's upgradable, it's actually exclusive so we can treat
* it as a write lock. */
return 0;
}
-/* lock entire database with write lock */
-int tdb1_lockall(struct tdb_context *tdb)
-{
- return tdb1_allrecord_lock(tdb, F_WRLCK, TDB_LOCK_WAIT, false);
-}
-
-/* unlock entire database with write lock */
-int tdb1_unlockall(struct tdb_context *tdb)
-{
- return tdb1_allrecord_unlock(tdb, F_WRLCK);
-}
-
-/* lock entire database with read lock */
-int tdb1_lockall_read(struct tdb_context *tdb)
-{
- return tdb1_allrecord_lock(tdb, F_RDLCK, TDB_LOCK_WAIT, false);
-}
-
-/* unlock entire database with read lock */
-int tdb1_unlockall_read(struct tdb_context *tdb)
-{
- return tdb1_allrecord_unlock(tdb, F_RDLCK);
-}
-
/* lock/unlock one hash chain. This is meant to be used to reduce
contention - it cannot guarantee how many records will be locked */
int tdb1_chainlock(struct tdb_context *tdb, TDB_DATA key)