File: lock-tracking.h

package info (click to toggle)
tdb 1.4.8-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,116 kB
  • sloc: python: 35,571; ansic: 21,647; xml: 475; sh: 274; makefile: 147
file content (25 lines) | stat: -rw-r--r-- 681 bytes parent folder | download | duplicates (39)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 */