UbixOS V2 2.0

Macros
fcntl.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | AT_FDCWD -100
#define | F_DUPFD 0 /* duplicate file descriptor */
#define | F_GETFD 1 /* get file descriptor flags */
#define | F_GETFL 3 /* get file status flags */
#define | F_GETLK 7 /* get record locking information */
#define | F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */
#define | F_SETFD 2 /* set file descriptor flags */
#define | F_SETFL 4 /* set file status flags */
#define | F_SETLK 8 /* set record locking information */
#define | F_SETLKW 9 /* F_SETLK; wait if blocked */
#define | F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */
#define | FAPPEND O_APPEND /* kernel/compat */
#define | FASYNC O_ASYNC /* kernel/compat */
#define | FCNTLFLAGS (FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FPOSIXSHM|O_DIRECT)
#define | FEXEC O_EXEC
#define | FFLAGS(oflags) ((oflags) & O_EXEC ? (oflags) : (oflags) + 1)
#define | FFSYNC O_FSYNC /* kernel */
#define | FHASLOCK 0x4000 /* descriptor holds advisory lock */
#define | FMASK (FREAD|FWRITE|FAPPEND|FASYNC|FFSYNC|FNONBLOCK|O_DIRECT|FEXEC)
#define | FNDELAY O_NONBLOCK /* compat */
#define | FNONBLOCK O_NONBLOCK /* kernel */
#define | FPOSIXSHM O_NOFOLLOW
#define | FREAD 0x0001
#define | FWRITE 0x0002
#define | O_ACCMODE 0x0003 /* mask for above modes */
#define | O_APPEND 0x0008 /* set append mode */
#define | O_ASYNC 0x0040 /* signal pgrp when data ready */
#define | O_CREAT 0x0200 /* create if nonexistent */
#define | O_DIRECT 0x00010000
#define | O_DIRECTORY 0x00020000 /* Fail if not directory */
#define | O_EXCL 0x0800 /* error if already exists */
#define | O_EXEC 0x00040000 /* Open for execute only */
#define | O_EXLOCK 0x0020 /* open with exclusive file lock */
#define | O_FSYNC 0x0080 /* synchronous writes */
#define | O_NDELAY O_NONBLOCK /* compat */
#define | O_NOFOLLOW 0x0100 /* don't follow symlinks */
#define | O_NONBLOCK 0x0004 /* no delay */
#define | O_RDONLY 0x0000 /* open for reading only */
#define | O_RDWR 0x0002 /* open for reading and writing */
#define | O_SHLOCK 0x0010 /* open with shared file lock */
#define | O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */
#define | O_TRUNC 0x0400 /* truncate to zero length */
#define | O_WRONLY 0x0001 /* open for writing only */
#define | OFLAGS(fflags) ((fflags) & O_EXEC ? (fflags) : (fflags) - 1)

## Macro Definition Documentation

## ◆ AT_FDCWD

#define AT_FDCWD -100

Definition at line 32 of file fcntl.h.

## ◆ F_DUPFD

#define F_DUPFD 0 /* duplicate file descriptor */

Definition at line 35 of file fcntl.h.

## ◆ F_GETFD

#define F_GETFD 1 /* get file descriptor flags */

Definition at line 36 of file fcntl.h.

## ◆ F_GETFL

#define F_GETFL 3 /* get file status flags */

Definition at line 38 of file fcntl.h.

## ◆ F_GETLK

#define F_GETLK 7 /* get record locking information */

Definition at line 42 of file fcntl.h.

## ◆ F_GETOWN

#define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */

Definition at line 40 of file fcntl.h.

## ◆ F_SETFD

#define F_SETFD 2 /* set file descriptor flags */

Definition at line 37 of file fcntl.h.

## ◆ F_SETFL

#define F_SETFL 4 /* set file status flags */

Definition at line 39 of file fcntl.h.

## ◆ F_SETLK

#define F_SETLK 8 /* set record locking information */

Definition at line 43 of file fcntl.h.

## ◆ F_SETLKW

#define F_SETLKW 9 /* F_SETLK; wait if blocked */

Definition at line 44 of file fcntl.h.

## ◆ F_SETOWN

#define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */

Definition at line 41 of file fcntl.h.

## ◆ FAPPEND

#define FAPPEND O_APPEND /* kernel/compat */

Definition at line 69 of file fcntl.h.

## ◆ FASYNC

#define FASYNC O_ASYNC /* kernel/compat */

Definition at line 70 of file fcntl.h.

## ◆ FCNTLFLAGS

#define FCNTLFLAGS (FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FPOSIXSHM|O_DIRECT)

Definition at line 80 of file fcntl.h.

## ◆ FEXEC

#define FEXEC O_EXEC

Definition at line 91 of file fcntl.h.

## ◆ FFLAGS

#define FFLAGS | ( |  | oflags | ) | ((oflags) & O_EXEC ? (oflags) : (oflags) + 1)

Definition at line 88 of file fcntl.h.

## ◆ FFSYNC

#define FFSYNC O_FSYNC /* kernel */

Definition at line 71 of file fcntl.h.

## ◆ FHASLOCK

#define FHASLOCK 0x4000 /* descriptor holds advisory lock */

Definition at line 66 of file fcntl.h.

## ◆ FMASK

#define FMASK (FREAD|FWRITE|FAPPEND|FASYNC|FFSYNC|FNONBLOCK|O_DIRECT|FEXEC)

Definition at line 93 of file fcntl.h.

## ◆ FNDELAY

#define FNDELAY O_NONBLOCK /* compat */

Definition at line 73 of file fcntl.h.

## ◆ FNONBLOCK

#define FNONBLOCK O_NONBLOCK /* kernel */

Definition at line 72 of file fcntl.h.

## ◆ FPOSIXSHM

#define FPOSIXSHM O_NOFOLLOW

Definition at line 75 of file fcntl.h.

## ◆ FREAD

#define FREAD 0x0001

Definition at line 47 of file fcntl.h.

## ◆ FWRITE

#define FWRITE 0x0002

Definition at line 48 of file fcntl.h.

## ◆ O_ACCMODE

#define O_ACCMODE 0x0003 /* mask for above modes */

Definition at line 64 of file fcntl.h.

## ◆ O_APPEND

#define O_APPEND 0x0008 /* set append mode */

Definition at line 50 of file fcntl.h.

## ◆ O_ASYNC

#define O_ASYNC 0x0040 /* signal pgrp when data ready */

Definition at line 53 of file fcntl.h.

## ◆ O_CREAT

#define O_CREAT 0x0200 /* create if nonexistent */

Definition at line 57 of file fcntl.h.

## ◆ O_DIRECT

#define O_DIRECT 0x00010000

Definition at line 60 of file fcntl.h.

## ◆ O_DIRECTORY

#define O_DIRECTORY 0x00020000 /* Fail if not directory */

Definition at line 77 of file fcntl.h.

## ◆ O_EXCL

#define O_EXCL 0x0800 /* error if already exists */

Definition at line 59 of file fcntl.h.

## ◆ O_EXEC

#define O_EXEC 0x00040000 /* Open for execute only */

Definition at line 78 of file fcntl.h.

## ◆ O_EXLOCK

#define O_EXLOCK 0x0020 /* open with exclusive file lock */

Definition at line 52 of file fcntl.h.

## ◆ O_FSYNC

#define O_FSYNC 0x0080 /* synchronous writes */

Definition at line 54 of file fcntl.h.

## ◆ O_NDELAY

#define O_NDELAY O_NONBLOCK /* compat */

Definition at line 74 of file fcntl.h.

## ◆ O_NOFOLLOW

#define O_NOFOLLOW 0x0100 /* don't follow symlinks */

Definition at line 56 of file fcntl.h.

## ◆ O_NONBLOCK

#define O_NONBLOCK 0x0004 /* no delay */

Definition at line 49 of file fcntl.h.

## ◆ O_RDONLY

#define O_RDONLY 0x0000 /* open for reading only */

Definition at line 61 of file fcntl.h.

## ◆ O_RDWR

#define O_RDWR 0x0002 /* open for reading and writing */

Definition at line 63 of file fcntl.h.

## ◆ O_SHLOCK

#define O_SHLOCK 0x0010 /* open with shared file lock */

Definition at line 51 of file fcntl.h.

## ◆ O_SYNC

#define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */

Definition at line 55 of file fcntl.h.

## ◆ O_TRUNC

#define O_TRUNC 0x0400 /* truncate to zero length */

Definition at line 58 of file fcntl.h.

## ◆ O_WRONLY

#define O_WRONLY 0x0001 /* open for writing only */

Definition at line 62 of file fcntl.h.

## ◆ OFLAGS

#define OFLAGS | ( |  | fflags | ) | ((fflags) & O_EXEC ? (fflags) : (fflags) - 1)

Definition at line 89 of file fcntl.h.