Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef _SPARC_FCNTL_H
0003 #define _SPARC_FCNTL_H
0004 
0005 #define O_APPEND    0x0008
0006 #define FASYNC      0x0040  /* fcntl, for BSD compatibility */
0007 #define O_CREAT     0x0200  /* not fcntl */
0008 #define O_TRUNC     0x0400  /* not fcntl */
0009 #define O_EXCL      0x0800  /* not fcntl */
0010 #define O_DSYNC     0x2000  /* used to be O_SYNC, see below */
0011 #define O_NONBLOCK  0x4000
0012 #if defined(__sparc__) && defined(__arch64__)
0013 #define O_NDELAY    0x0004
0014 #else
0015 #define O_NDELAY    (0x0004 | O_NONBLOCK)
0016 #endif
0017 #define O_NOCTTY    0x8000  /* not fcntl */
0018 #define O_LARGEFILE 0x40000
0019 #define O_DIRECT        0x100000 /* direct disk access hint */
0020 #define O_NOATIME   0x200000
0021 #define O_CLOEXEC   0x400000
0022 /*
0023  * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
0024  * the O_SYNC flag.  We continue to use the existing numerical value
0025  * for O_DSYNC semantics now, but using the correct symbolic name for it.
0026  * This new value is used to request true Posix O_SYNC semantics.  It is
0027  * defined in this strange way to make sure applications compiled against
0028  * new headers get at least O_DSYNC semantics on older kernels.
0029  *
0030  * This has the nice side-effect that we can simply test for O_DSYNC
0031  * wherever we do not care if O_DSYNC or O_SYNC is used.
0032  *
0033  * Note: __O_SYNC must never be used directly.
0034  */
0035 #define __O_SYNC    0x800000
0036 #define O_SYNC      (__O_SYNC|O_DSYNC)
0037 
0038 #define O_PATH      0x1000000
0039 #define __O_TMPFILE 0x2000000
0040 
0041 #define F_GETOWN    5   /*  for sockets. */
0042 #define F_SETOWN    6   /*  for sockets. */
0043 #define F_GETLK     7
0044 #define F_SETLK     8
0045 #define F_SETLKW    9
0046 
0047 /* for posix fcntl() and lockf() */
0048 #define F_RDLCK     1
0049 #define F_WRLCK     2
0050 #define F_UNLCK     3
0051 
0052 #define __ARCH_FLOCK_PAD    short __unused;
0053 #define __ARCH_FLOCK64_PAD  short __unused;
0054 
0055 #include <asm-generic/fcntl.h>
0056 
0057 #endif