1 /**************************************************************************/ 2 /* */ 3 /* Copyright (c) Microsoft Corporation. All rights reserved. */ 4 /* */ 5 /* This software is licensed under the Microsoft Software License */ 6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */ 7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ 8 /* and in the root directory of this software. */ 9 /* */ 10 /**************************************************************************/ 11 12 /**************************************************************************/ 13 /**************************************************************************/ 14 /** */ 15 /** ThreadX Component */ 16 /** */ 17 /** POSIX Compliancy Wrapper (POSIX) */ 18 /** */ 19 /**************************************************************************/ 20 /**************************************************************************/ 21 22 /**************************************************************************/ 23 /* */ 24 /* EKP DEFINITIONS RELEASE */ 25 /* */ 26 /* fcntl.h PORTABLE C */ 27 /* 6.1.7 */ 28 /* AUTHOR */ 29 /* */ 30 /* William E. Lamie, Microsoft Corporation */ 31 /* */ 32 /* DESCRIPTION */ 33 /* */ 34 /* This file defines the constants, structures, etc.needed to */ 35 /* implement the Evacuation Kit for POSIX Users (POSIX) */ 36 /* */ 37 /* */ 38 /* RELEASE HISTORY */ 39 /* */ 40 /* DATE NAME DESCRIPTION */ 41 /* */ 42 /* 06-02-2021 William E. Lamie Initial Version 6.1.7 */ 43 /* */ 44 /**************************************************************************/ 45 46 #ifndef _FCNTL_H 47 #define _FCNTL_H 48 49 #define O_ACCMODE 0x0003 50 #define O_RDONLY 0x0000 51 #define O_WRONLY 0x0001 52 #define O_RDWR 0x0002 53 #define O_APPEND 0x0008 54 #define O_SYNC 0x0010 55 #define O_NONBLOCK 0x0080 56 #define O_CREAT 0x0100 57 #define O_TRUNC 0x0200 58 #define O_EXCL 0x0400 59 #define O_NOCTTY 0x0800 60 #define FASYNC 0x1000 61 #define O_LARGEFILE 0x2000 62 #define O_DIRECT 0x8000 63 #define O_DIRECTORY 0x10000 64 #define O_NOFOLLOW 0x20000 65 66 #define O_NDELAY O_NONBLOCK 67 68 #define F_DUPFD 0 69 #define F_GETFD 1 70 #define F_SETFD 2 71 #define F_GETFL 3 72 #define F_SETFL 4 73 #define F_GETLK 14 74 #define F_SETLK 6 75 #define F_SETLKW 7 76 77 #define F_SETOWN 24 78 #define F_GETOWN 23 79 #define F_SETSIG 10 80 #define F_GETSIG 11 81 82 #define FD_CLOEXEC 1 83 84 # define POSIX_FADV_NORMAL 0 85 # define POSIX_FADV_RANDOM 1 86 # define POSIX_FADV_SEQUENTIAL 2 87 # define POSIX_FADV_WILLNEED 3 88 # define POSIX_FADV_DONTNEED 4 89 # define POSIX_FADV_NOREUSE 5 90 91 /* no flock structure for Threadx at this time */ 92 93 #endif 94