diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2010-02-17 15:42:15 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2010-02-17 15:42:15 +1030 |
commit | fca1621965c547e2d076eca2a2599e9629f91266 (patch) | |
tree | 94abacb92dfa97c70e2137e9a2a6b63f2c73938c /source3/utils/net_proto.h | |
parent | caaf5c6baa1a4f340c1f38edd99b3a8b56621b8b (diff) | |
download | samba-fca1621965c547e2d076eca2a2599e9629f91266.tar.gz samba-fca1621965c547e2d076eca2a2599e9629f91266.tar.bz2 samba-fca1621965c547e2d076eca2a2599e9629f91266.zip |
tdb: tdb_allrecord_lock/tdb_allrecord_unlock/tdb_allrecord_upgrade
Centralize locking of all chains of the tdb; rename _tdb_lockall to
tdb_allrecord_lock and _tdb_unlockall to tdb_allrecord_unlock, and
tdb_brlock_upgrade to tdb_allrecord_upgrade.
Then we use this in the transaction code. Unfortunately, if the transaction
code records that it has grabbed the allrecord lock read-only, write locks
will fail, so we treat this upgradable lock as a write lock, and mark it
as upgradable using the otherwise-unused offset field.
One subtlety: now the transaction code is using the allrecord_lock, the
tdb_release_extra_locks() function drops it for us, so we no longer need
to do it manually in _tdb_transaction_cancel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source3/utils/net_proto.h')
0 files changed, 0 insertions, 0 deletions