From 9660546a18cc9af508e6e594349d869bdcefafb2 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:24:13 +0930 Subject: tdb2: test: import tdb1's tests. The main change is to s/tdb/tdb1_/ everywhere. Signed-off-by: Rusty Russell (Imported from CCAN commit fab544c24c1ad6523f95893abcaec4e6cce6c2b4) --- lib/tdb2/test/tdb1-lock-tracking.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lib/tdb2/test/tdb1-lock-tracking.h (limited to 'lib/tdb2/test/tdb1-lock-tracking.h') diff --git a/lib/tdb2/test/tdb1-lock-tracking.h b/lib/tdb2/test/tdb1-lock-tracking.h new file mode 100644 index 0000000000..cb8c2f1278 --- /dev/null +++ b/lib/tdb2/test/tdb1-lock-tracking.h @@ -0,0 +1,26 @@ +#ifndef TDB1_LOCK_TRACKING_H +#define TDB1_LOCK_TRACKING_H +#include +#include + +/* Set this if you want a callback after fnctl unlock. */ +extern void (*unlock_callback1)(int fd); + +/* Replacement fcntl. */ +int fcntl_with_lockcheck1(int fd, int cmd, ... /* arg */ ); + +/* Discard locking info: returns number of locks outstanding. */ +unsigned int forget_locking1(void); + +/* Number of errors in locking. */ +extern int locking_errors1; + +/* Suppress lock checking. */ +extern bool suppress_lockcheck1; + +/* Make all locks non-blocking. */ +extern bool nonblocking_locks1; + +/* Number of times we failed a lock because we made it non-blocking. */ +extern int locking_would_block1; +#endif /* LOCK_TRACKING_H */ -- cgit