summaryrefslogtreecommitdiff
path: root/utility/rtos_compatibility_layers/posix/fcntl.h
blob: db943625747e3e87725336f776b058378440793b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/***************************************************************************
 * Copyright (c) 2024 Microsoft Corporation
 * Copyright (c) 2026-present Eclipse ThreadX contributors
 *
 * This program and the accompanying materials are made available under the
 * terms of the MIT License which is available at
 * https://opensource.org/licenses/MIT.
 *
 * SPDX-License-Identifier: MIT
 **************************************************************************/

/**************************************************************************/
/**************************************************************************/
/**                                                                       */
/**   ThreadX Component                                                   */
/**                                                                       */
/**   POSIX Compliancy Wrapper (POSIX)                                    */
/**                                                                       */
/**************************************************************************/
/**************************************************************************/

/**************************************************************************/
/*                                                                        */
/*  EKP DEFINITIONS                                        RELEASE        */
/*                                                                        */
/*    fcntl.h                                             PORTABLE C      */
/*                                                           6.1.7        */
/*  AUTHOR                                                                */
/*                                                                        */
/*    William E. Lamie, Microsoft Corporation                             */
/*                                                                        */
/*  DESCRIPTION                                                           */
/*                                                                        */
/*    This file defines the constants, structures, etc.needed to          */
/*    implement the Evacuation Kit for POSIX Users (POSIX)                */
/*                                                                        */
/**************************************************************************/

#ifndef _FCNTL_H
#define _FCNTL_H

#define O_ACCMODE	0x0003
#define O_RDONLY	0x0000
#define O_WRONLY	0x0001
#define O_RDWR		0x0002
#define O_APPEND	0x0008
#define O_SYNC		0x0010
#define O_NONBLOCK	0x0080
#define O_CREAT     0x0100
#define O_TRUNC		0x0200
#define O_EXCL		0x0400
#define O_NOCTTY	0x0800
#define FASYNC		0x1000
#define O_LARGEFILE	0x2000
#define O_DIRECT	0x8000
#define O_DIRECTORY	0x10000
#define O_NOFOLLOW	0x20000

#define O_NDELAY	O_NONBLOCK

#define F_DUPFD		0
#define F_GETFD		1
#define F_SETFD		2
#define F_GETFL		3
#define F_SETFL		4
#define F_GETLK		14
#define F_SETLK		6
#define F_SETLKW	7

#define F_SETOWN	24
#define F_GETOWN	23
#define F_SETSIG	10
#define F_GETSIG	11

#define FD_CLOEXEC	1

# define POSIX_FADV_NORMAL	0
# define POSIX_FADV_RANDOM	1
# define POSIX_FADV_SEQUENTIAL	2
# define POSIX_FADV_WILLNEED	3
# define POSIX_FADV_DONTNEED	4
# define POSIX_FADV_NOREUSE	5

/* no flock structure for Threadx at this time */

#endif