1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
samba-mirror/lib/tdb/test/lock-tracking.h
Rusty Russell 0802791081 tdb: import unit tests from CCAN into tdb/test/
I pulled tdb into CCAN as an experiment a while ago; it doesn't belong
there, but it has accumulated some important unit tests.

These are copied from CCAN version init-1486-gc438ec1 with #include "../"
changed to #include "../common/".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-02-14 04:05:43 +10:30

26 lines
681 B
C

#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 */