home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / armlinux / alpha / PARTITIONS / USR_GZ / usr / include / sys / file.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-14  |  786 b   |  30 lines

  1. #ifndef _SYS_FILE_H
  2. #define _SYS_FILE_H
  3.  
  4. #include <features.h>
  5.  
  6. #include <fcntl.h>
  7.  
  8. #define L_SET           0       /* absolute offset */
  9. #define L_INCR          1       /* relative to current offset */
  10. #define L_XTND          2       /* relative to end of file */
  11.  
  12. /* Operations for the `flock' call.  */
  13. #define LOCK_SH       1    /* Shared lock.  */
  14. #define LOCK_EX       2    /* Exclusive lock.  */
  15. #define LOCK_UN       8    /* Unlock.  */
  16.  
  17. /* Can be OR'd in to one of the above.  */
  18. #define LOCK_NB       4    /* Don't block when locking.  */
  19.  
  20. __BEGIN_DECLS
  21.  
  22. /* Apply or remove an advisory lock, according to OPERATION,
  23.    on the file FD refers to.  */
  24. extern int __flock __P ((int __fd, int __operation));
  25. extern int flock __P ((int __fd, int __operation));
  26.  
  27. __END_DECLS
  28.  
  29. #endif
  30.