lock-tracking.h 681 B

12345678910111213141516171819202122232425
  1. #ifndef LOCK_TRACKING_H
  2. #define LOCK_TRACKING_H
  3. #include <stdbool.h>
  4. /* Set this if you want a callback after fnctl unlock. */
  5. extern void (*unlock_callback)(int fd);
  6. /* Replacement fcntl. */
  7. int fcntl_with_lockcheck(int fd, int cmd, ... /* arg */ );
  8. /* Discard locking info: returns number of locks outstanding. */
  9. unsigned int forget_locking(void);
  10. /* Number of errors in locking. */
  11. extern int locking_errors;
  12. /* Suppress lock checking. */
  13. extern bool suppress_lockcheck;
  14. /* Make all locks non-blocking. */
  15. extern bool nonblocking_locks;
  16. /* Number of times we failed a lock because we made it non-blocking. */
  17. extern int locking_would_block;
  18. #endif /* LOCK_TRACKING_H */