]> git.ozlabs.org Git - ccan/blob - ccan/tdb2/test/lock-tracking.h
failtest: add --trace to replace --tracepath
[ccan] / ccan / tdb2 / test / lock-tracking.h
1 #ifndef LOCK_TRACKING_H
2 #define LOCK_TRACKING_H
3 #include <stdbool.h>
4
5 /* Set this if you want a callback after fnctl unlock. */
6 extern void (*unlock_callback)(int fd);
7
8 /* Replacement fcntl. */
9 int fcntl_with_lockcheck(int fd, int cmd, ... /* arg */ );
10
11 /* Discard locking info: returns number of locks outstanding. */
12 unsigned int forget_locking(void);
13
14 /* Number of errors in locking. */
15 extern int locking_errors;
16
17 /* Suppress lock checking. */
18 extern bool suppress_lockcheck;
19
20 /* Make all locks non-blocking. */
21 extern bool nonblocking_locks;
22
23 /* Number of times we failed a lock because we made it non-blocking. */
24 extern int locking_would_block;
25 #endif /* LOCK_TRACKING_H */