You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
679 B

  1. /*
  2. libulockmgr: Userspace Lock Manager Library
  3. Copyright (C) 2006 Miklos Szeredi <miklos@szeredi.hu>
  4. This program can be distributed under the terms of the GNU LGPLv2.
  5. See the file COPYING.LIB.
  6. */
  7. #include <stdint.h>
  8. #include <fcntl.h>
  9. #include <sys/types.h>
  10. /**
  11. * Perform POSIX locking operation
  12. *
  13. * @param fd the file descriptor
  14. * @param cmd the locking command (F_GETFL, F_SETLK or F_SETLKW)
  15. * @param lock the lock parameters
  16. * @param owner the lock owner ID cookie
  17. * @param owner_len length of the lock owner ID cookie
  18. * @return 0 on success -errno on error
  19. */
  20. int ulockmgr_op(int fd, int cmd, struct flock *lock, const void *owner,
  21. size_t owner_len);