home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / ulockmgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-10-22  |  679 b   |  25 lines

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