diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-10-10 06:45:09 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-10-10 06:45:09 +0000 |
commit | 2d33e87424197b993e8e7d218c0945cc2b66078a (patch) | |
tree | ec4eeb9c527acd59c9dfdc72cb6be03a5a361540 /source3/tdb | |
parent | 2a9ce69f3b4a020bd1442901625562c6391746cd (diff) | |
download | samba-2d33e87424197b993e8e7d218c0945cc2b66078a.tar.gz samba-2d33e87424197b993e8e7d218c0945cc2b66078a.tar.bz2 samba-2d33e87424197b993e8e7d218c0945cc2b66078a.zip |
got rid of tdb_writelock() and instead lock a chain. tdb_writelock()
is conceptually flawed
(This used to be commit 6e4a3585521b7e5928298bd0f1418ff9fbcacfb4)
Diffstat (limited to 'source3/tdb')
-rw-r--r-- | source3/tdb/tdb.c | 25 |
1 files changed, 0 insertions, 25 deletions
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 */ |