]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb/test/lock-tracking.h
tdb: new test, cleanup old tests by centralizing lock tracking.
[ccan] / ccan / tdb / test / lock-tracking.h
diff --git a/ccan/tdb/test/lock-tracking.h b/ccan/tdb/test/lock-tracking.h
new file mode 100644 (file)
index 0000000..9afdd09
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef LOCK_TRACKING_H
+#define LOCK_TRACKING_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;
+#endif /* LOCK_TRACKING_H */