From 2d33e87424197b993e8e7d218c0945cc2b66078a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Oct 2000 06:45:09 +0000 Subject: got rid of tdb_writelock() and instead lock a chain. tdb_writelock() is conceptually flawed (This used to be commit 6e4a3585521b7e5928298bd0f1418ff9fbcacfb4) --- source3/tdb/tdb.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'source3/tdb') diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index 9c5e99e06b..45cbaf73ed 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -1278,31 +1278,6 @@ int tdb_close(TDB_CONTEXT *tdb) return 0; } -/* lock the database. If we already have it locked then don't do anything */ -int tdb_writelock(TDB_CONTEXT *tdb) -{ - if (tdb == NULL) { -#ifdef TDB_DEBUG - printf("tdb_writelock() called with null context\n"); -#endif - return -1; - } - - return tdb_lock(tdb, -1, F_WRLCK); -} - -/* unlock the database. */ -int tdb_writeunlock(TDB_CONTEXT *tdb) -{ - if (tdb == NULL) { -#ifdef TDB_DEBUG - printf("tdb_writeunlock() called with null context\n"); -#endif - return -1; - } - - return tdb_unlock(tdb, -1); -} /* lock one hash chain. This is meant to be used to reduce locking contention - it cannot guarantee how many records will be locked */ -- cgit