home *** CD-ROM | disk | FTP | other *** search
- /*
- * @(#) fcntl.h 2.3 88/08/09
- *
- * Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987, 1988.
- * Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987, 1988.
- * This Module contains Proprietary Information of
- * The Santa Cruz Operation, Microsoft Corporation
- * and AT&T, and should be treated as Confidential.
- */
-
- #include "lockcmn.h"
-
- /* Flag values accessible to open(2) and fcntl(2) */
- /* (The first three can only be set by open) */
- #define O_RDONLY 0000
- #define O_WRONLY 0001
- #define O_RDWR 0002
- #define O_NDELAY 0004 /* Non-blocking I/O */
- #define O_APPEND 0010 /* append (writes guaranteed at the end) */
- #ifdef M_I386
- #define O_SYNCW 0020 /* synchronous write option */
- #else
- #define O_SYNCW 0100
- #endif
- #define O_SYNC O_SYNCW
-
- /* Flag values accessible only to open(2) */
- #define O_CREAT 00400 /* open with file create (uses third open arg)*/
- #define O_TRUNC 01000 /* open with truncation */
- #define O_EXCL 02000 /* exclusive open */
-
- /* fcntl(2) requests */
- #define F_DUPFD 0 /* Duplicate fildes */
- #define F_GETFD 1 /* Get fildes flags */
- #define F_SETFD 2 /* Set fildes flags */
- #define F_GETFL 3 /* Get file flags */
- #define F_SETFL 4 /* Set file flags */
-
- #define F_GETLK 5 /* Get first blocking lock */
- #define F_SETLK 6 /* Non-blocking lock */
- #define F_SETLKW 7 /* Blocking lock */
- #define F_CHKFL 8
-
- #define F_RDLCK CMN_RDLCK
- #define F_WRLCK CMN_WRLCK
- #define F_UNLCK CMN_UNLCK
-
- #ifdef M_KERNEL
- /* COFF versions of the flock structure flags */
- #define CF_RDLCK 1
- #define CF_WRLCK 2
- #define CF_UNLCK 3
- #endif
-
- /* Flock structure used for System V fcntl(). */
-
- struct flock {
- short l_type;
- short l_whence;
- long l_start;
- long l_len;
- #ifdef M_I386
- short l_sysid;
- short l_pid;
- #else
- short l_pid;
- short l_sysid;
- #endif
- };
-