]> git.sur5r.net Git - freertos/blob - FreeRTOS-Labs/Demo/FreeRTOS_Plus_POSIX_with_actor_Windows_Simulator/lib/include/FreeRTOS_POSIX/sys/types.h
Add the Labs projects provided in the V10.2.1_191129 zip file.
[freertos] / FreeRTOS-Labs / Demo / FreeRTOS_Plus_POSIX_with_actor_Windows_Simulator / lib / include / FreeRTOS_POSIX / sys / types.h
1 /*\r
2  * Amazon FreeRTOS POSIX V1.1.0\r
3  * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
4  *\r
5  * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
6  * this software and associated documentation files (the "Software"), to deal in\r
7  * the Software without restriction, including without limitation the rights to\r
8  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
9  * the Software, and to permit persons to whom the Software is furnished to do so,\r
10  * subject to the following conditions:\r
11  *\r
12  * The above copyright notice and this permission notice shall be included in all\r
13  * copies or substantial portions of the Software.\r
14  *\r
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
17  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
19  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
21  *\r
22  * http://aws.amazon.com/freertos\r
23  * http://www.FreeRTOS.org\r
24  */\r
25 \r
26 /**\r
27  * @file sys/types.h\r
28  * @brief Data types.\r
29  *\r
30  * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html\r
31  */\r
32 \r
33 #ifndef _FREERTOS_POSIX_TYPES_H_\r
34 #define _FREERTOS_POSIX_TYPES_H_\r
35 \r
36 /* C standard library includes. */\r
37 #include <stdint.h>\r
38 \r
39 /* FreeRTOS types include */\r
40 #include "FreeRTOS_POSIX_types.h"\r
41 \r
42 /**\r
43  * @brief Used for system times in clock ticks or CLOCKS_PER_SEC.\r
44  *\r
45  * Enabled/disabled by posixconfigENABLE_CLOCK_T.\r
46  */\r
47 #if !defined( posixconfigENABLE_CLOCK_T ) || ( posixconfigENABLE_CLOCK_T == 1 )\r
48     typedef uint32_t                 clock_t;\r
49 #endif\r
50 \r
51 /**\r
52  * @brief Used for clock ID type in the clock and timer functions.\r
53  *\r
54  * Enabled/disabled by posixconfigENABLE_CLOCKID_T.\r
55  */\r
56 #if !defined( posixconfigENABLE_CLOCKID_T ) || ( posixconfigENABLE_CLOCKID_T == 1 )\r
57     typedef int                      clockid_t;\r
58 #endif\r
59 \r
60 /**\r
61  * @brief Used for some file attributes.\r
62  *\r
63  * Enabled/disabled by posixconfigENABLE_MODE_T.\r
64  */\r
65 #if !defined( posixconfigENABLE_MODE_T ) || ( posixconfigENABLE_MODE_T == 1 )\r
66     typedef int                      mode_t;\r
67 #endif\r
68 \r
69 /**\r
70  * @brief Used for process IDs and process group IDs.\r
71  *\r
72  * Enabled/disabled by posixconfigENABLE_PID_T.\r
73  */\r
74 #if !defined( posixconfigENABLE_PID_T ) || ( posixconfigENABLE_PID_T == 1 )\r
75     typedef int                      pid_t;\r
76 #endif\r
77 \r
78 /**\r
79  * @brief Used to identify a thread attribute object.\r
80  *\r
81  * Enabled/disabled by posixconfigENABLE_PTHREAD_ATTR_T.\r
82  */\r
83 #if !defined( posixconfigENABLE_PTHREAD_ATTR_T ) || ( posixconfigENABLE_PTHREAD_ATTR_T == 1 )\r
84     typedef PthreadAttrType_t        pthread_attr_t;\r
85 #endif\r
86 \r
87 /**\r
88  * @brief Used to identify a barrier.\r
89  *\r
90  * Enabled/disabled by posixconfigENABLE_PTHREAD_BARRIER_T.\r
91  */\r
92 #if !defined( posixconfigENABLE_PTHREAD_BARRIER_T ) || ( posixconfigENABLE_PTHREAD_BARRIER_T == 1 )\r
93     typedef PthreadBarrierType_t     pthread_barrier_t;\r
94 #endif\r
95 \r
96 /**\r
97  * @brief Used to define a barrier attributes object.\r
98  */\r
99 typedef void                         * pthread_barrierattr_t;\r
100 \r
101 /**\r
102  * @brief Used for condition variables.\r
103  *\r
104  * Enabled/disabled by posixconfigENABLE_PTHREAD_COND_T.\r
105  */\r
106 #if !defined( posixconfigENABLE_PTHREAD_COND_T ) || ( posixconfigENABLE_PTHREAD_COND_T == 1 )\r
107     typedef  PthreadCondType_t       pthread_cond_t;\r
108 #endif\r
109 \r
110 /**\r
111  * @brief Used to identify a condition attribute object.\r
112  *\r
113  * Enabled/disabled by posixconfigENABLE_PTHREAD_CONDATTR_T.\r
114  */\r
115 #if !defined( posixconfigENABLE_PTHREAD_CONDATTR_T ) || ( posixconfigENABLE_PTHREAD_CONDATTR_T == 1 )\r
116     typedef void                     * pthread_condattr_t;\r
117 #endif\r
118 \r
119 /**\r
120  * @brief Used for mutexes.\r
121  *\r
122  * Enabled/disabled by posixconfigENABLE_PTHREAD_MUTEX_T.\r
123  */\r
124 #if !defined( posixconfigENABLE_PTHREAD_MUTEX_T ) || ( posixconfigENABLE_PTHREAD_MUTEX_T == 1 )\r
125     typedef PthreadMutexType_t       pthread_mutex_t;\r
126 #endif\r
127 \r
128 /**\r
129  * @brief Used to identify a mutex attribute object.\r
130  *\r
131  * Enabled/disabled by posixconfigENABLE_PTHREAD_MUTEXATTR_T.\r
132  */\r
133 #if !defined( posixconfigENABLE_PTHREAD_MUTEXATTR_T ) || ( posixconfigENABLE_PTHREAD_MUTEXATTR_T == 1 )\r
134     typedef PthreadMutexAttrType_t   pthread_mutexattr_t;\r
135 #endif\r
136 \r
137 /**\r
138  * @brief Used to identify a thread.\r
139  *\r
140  * Enabled/disabled by posixconfigENABLE_PTHREAD_T.\r
141  */\r
142 #if !defined( posixconfigENABLE_PTHREAD_T ) || ( posixconfigENABLE_PTHREAD_T == 1 )\r
143     typedef void                     * pthread_t;\r
144 #endif\r
145 \r
146 /**\r
147  * @brief Used for a count of bytes or an error indication.\r
148  *\r
149  * Enabled/disabled by posixconfigENABLE_SSIZE_T.\r
150  */\r
151 #if !defined( posixconfigENABLE_SSIZE_T ) || ( posixconfigENABLE_SSIZE_T == 1 )\r
152     typedef int                      ssize_t;\r
153 #endif\r
154 \r
155 /**\r
156  * @brief Used for time in seconds.\r
157  *\r
158  * Enabled/disabled by posixconfigENABLE_TIME_T.\r
159  */\r
160 #if !defined( posixconfigENABLE_TIME_T ) || ( posixconfigENABLE_TIME_T == 1 )\r
161     typedef int64_t                  time_t;\r
162 #endif\r
163 \r
164 /**\r
165  * @brief Used for timer ID returned by timer_create().\r
166  *\r
167  * Enabled/disabled by posixconfigENABLE_TIMER_T.\r
168  */\r
169 #if !defined( posixconfigENABLE_TIMER_T ) || ( posixconfigENABLE_TIMER_T == 1 )\r
170     typedef void                     * timer_t;\r
171 #endif\r
172 \r
173 /**\r
174  * @brief Used for time in microseconds.\r
175  *\r
176  * Enabled/disabled by posixconfigENABLE_USECONDS_T.\r
177  */\r
178 #if !defined( posixconfigENABLE_USECONDS_T ) || ( posixconfigENABLE_USECONDS_T == 1 )\r
179     typedef unsigned long            useconds_t;\r
180 #endif\r
181 \r
182 /**\r
183  * @brief Used for file sizes.\r
184  *\r
185  * Enabled/disabled by posixconfigENABLE_OFF_T.\r
186  */\r
187 #if !defined( posixconfigENABLE_OFF_T ) || ( posixconfigENABLE_OFF_T == 1 )\r
188     typedef long int                 off_t;\r
189 #endif\r
190 \r
191 #endif /* ifndef _FREERTOS_POSIX_TYPES_H_ */\r