1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/lib/tdb
Rusty Russell fca1621965 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>
2010-02-17 15:42:15 +10:30
..
common tdb: tdb_allrecord_lock/tdb_allrecord_unlock/tdb_allrecord_upgrade 2010-02-17 15:42:15 +10:30
docs tdb: add TDB_DISALLOW_NESTING and make TDB_ALLOW_NESTING the default behavior 2009-11-20 09:45:36 +01:00
include tdb: Also build and install tdb manpages from standalone tdb. 2009-12-21 23:40:12 +01:00
manpages tdb: Also build and install tdb manpages from standalone tdb. 2009-12-21 23:40:12 +01:00
python tdb: add tests for double .close() in pytdb 2009-10-29 10:14:33 +10:30
script release-scripts: parametrize scripts 2010-02-08 10:29:06 -05:00
tools tdbtool: avoid using c++ reserved words. 2009-12-17 15:40:42 +01:00
web Update tdb and talloc web pages 2009-05-05 19:04:39 -04:00
aclocal.m4 Move common libraries from root to lib/. 2008-09-17 14:11:12 +02:00
autogen.sh Remove swig use from tdb standalone build. 2008-12-18 19:49:53 +00:00
build_macros.m4 Add shared-build target to tdb. 2008-09-19 18:07:53 -04:00
config.guess Update copies of config.guess and config.sub. 2009-05-16 04:03:12 +02:00
config.mk lib/tdb: add tdb_check() 2009-10-22 00:10:34 +10:30
config.sub Update copies of config.guess and config.sub. 2009-05-16 04:03:12 +02:00
configure.ac tdb: raise version to 1.2.1 2010-02-06 10:48:39 -05:00
install-sh Move common libraries from root to lib/. 2008-09-17 14:11:12 +02:00
libtdb.m4 lib/tdb: add tdb_check() 2009-10-22 00:10:34 +10:30
Makefile.in tdb: fix standalone 'make installdocs' 2010-01-06 14:43:39 +01:00
pytdb.c tdb: fix typo in python's Tdb.get() docstring 2009-10-29 10:14:33 +10:30
python.mk lib/tdb: the python bindings don't use swig anymore 2009-02-02 15:16:08 +01:00
rules.mk tdb: kill last bits from swig 2009-10-29 10:14:33 +10:30
tdb.exports lib/tdb: add tdb_check() 2009-10-22 00:10:34 +10:30
tdb.mk tdb: fix standalone 'make installdocs' 2010-01-06 14:43:39 +01:00
tdb.pc.in Move common libraries from root to lib/. 2008-09-17 14:11:12 +02:00
tdb.signatures tdb: Fix formatting of API check file. 2009-12-21 23:40:12 +01:00