summaryrefslogtreecommitdiff
path: root/lib/tdb/test/run-oldhash.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-02-21 16:34:32 +0100
committerJeremy Allison <jra@samba.org>2014-05-22 21:05:15 +0200
commitdb5bda56bf089ec6052d92bb78f3b49f7c812e00 (patch)
tree85f719a424147e838a05e77cf97bb3401d596988 /lib/tdb/test/run-oldhash.c
parentcbd73ba1635c061fa71ff0476cbce087b389d1ad (diff)
downloadsamba-db5bda56bf089ec6052d92bb78f3b49f7c812e00.tar.gz
tdb: add TDB_MUTEX_LOCKING support
This adds optional support for locking based on shared robust mutexes. The caller can use the TDB_MUTEX_LOCKING flag together with TDB_CLEAR_IF_FIRST after verifying with tdb_runtime_check_for_robust_mutexes() that it's supported by the current system. The caller should be aware that using TDB_MUTEX_LOCKING implies some limitations, e.g. it's not possible to have multiple read chainlocks on a given hash chain from multiple processes. Note: that this doesn't make tdb thread safe! Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/tdb/test/run-oldhash.c')
-rw-r--r--lib/tdb/test/run-oldhash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tdb/test/run-oldhash.c b/lib/tdb/test/run-oldhash.c
index 535336cb473..aaee6f62ef7 100644
--- a/lib/tdb/test/run-oldhash.c
+++ b/lib/tdb/test/run-oldhash.c
@@ -9,6 +9,7 @@
#include "../common/open.c"
#include "../common/check.c"
#include "../common/hash.c"
+#include "../common/mutex.c"
#include "tap-interface.h"
#include <stdlib.h>
#include "logging.h"