summaryrefslogtreecommitdiff
path: root/lib/tdb2/test/lock-tracking.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-06-20 18:40:33 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-06-20 11:18:35 +0200
commitd24ddb0350ddb402bd9d219e129439cdbd77ecfe (patch)
tree7d1d7a632788ae10de780d0e664baa01264bdba3 /lib/tdb2/test/lock-tracking.h
parentd925b327f4703cc141c0a7f3eec912dba8440880 (diff)
downloadsamba-d24ddb0350ddb402bd9d219e129439cdbd77ecfe.tar.gz
samba-d24ddb0350ddb402bd9d219e129439cdbd77ecfe.tar.bz2
samba-d24ddb0350ddb402bd9d219e129439cdbd77ecfe.zip
tdb2: add lib/tdb2 (from CCAN init-1161-g661d41f)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb2/test/lock-tracking.h')
-rw-r--r--lib/tdb2/test/lock-tracking.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/tdb2/test/lock-tracking.h b/lib/tdb2/test/lock-tracking.h
new file mode 100644
index 0000000000..f2c9c44653
--- /dev/null
+++ b/lib/tdb2/test/lock-tracking.h
@@ -0,0 +1,25 @@
+#ifndef LOCK_TRACKING_H
+#define LOCK_TRACKING_H
+#include <stdbool.h>
+
+/* Set this if you want a callback after fnctl unlock. */
+extern void (*unlock_callback)(int fd);
+
+/* Replacement fcntl. */
+int fcntl_with_lockcheck(int fd, int cmd, ... /* arg */ );
+
+/* Discard locking info: returns number of locks outstanding. */
+unsigned int forget_locking(void);
+
+/* Number of errors in locking. */
+extern int locking_errors;
+
+/* Suppress lock checking. */
+extern bool suppress_lockcheck;
+
+/* Make all locks non-blocking. */
+extern bool nonblocking_locks;
+
+/* Number of times we failed a lock because we made it non-blocking. */
+extern int locking_would_block;
+#endif /* LOCK_TRACKING_H */