fcntl.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * include/asm-xtensa/fcntl.h
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 1995, 1996, 1997, 1998 by Ralf Baechle
  9. * Copyright (C) 2001 - 2005 Tensilica Inc.
  10. */
  11. #ifndef _XTENSA_FCNTL_H
  12. #define _XTENSA_FCNTL_H
  13. /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
  14. located on an ext2 file system */
  15. #define O_APPEND 0x0008
  16. #define O_SYNC 0x0010
  17. #define O_NONBLOCK 0x0080
  18. #define O_CREAT 0x0100 /* not fcntl */
  19. #define O_EXCL 0x0400 /* not fcntl */
  20. #define O_NOCTTY 0x0800 /* not fcntl */
  21. #define FASYNC 0x1000 /* fcntl, for BSD compatibility */
  22. #define O_LARGEFILE 0x2000 /* allow large file opens - currently ignored */
  23. #define O_DIRECT 0x8000 /* direct disk access hint - currently ignored*/
  24. #define O_NOATIME 0x100000
  25. #define F_GETLK 14
  26. #define F_GETLK64 15
  27. #define F_SETLK 6
  28. #define F_SETLKW 7
  29. #define F_SETLK64 16
  30. #define F_SETLKW64 17
  31. #define F_SETOWN 24 /* for sockets. */
  32. #define F_GETOWN 23 /* for sockets. */
  33. typedef struct flock {
  34. short l_type;
  35. short l_whence;
  36. __kernel_off_t l_start;
  37. __kernel_off_t l_len;
  38. long l_sysid;
  39. __kernel_pid_t l_pid;
  40. long pad[4];
  41. } flock_t;
  42. struct flock64 {
  43. short l_type;
  44. short l_whence;
  45. __kernel_off_t l_start;
  46. __kernel_off_t l_len;
  47. pid_t l_pid;
  48. };
  49. #define HAVE_ARCH_STRUCT_FLOCK
  50. #define HAVE_ARCH_STRUCT_FLOCK64
  51. #include <asm-generic/fcntl.h>
  52. #endif /* _XTENSA_FCNTL_H */