2 * Amazon FreeRTOS POSIX V1.1.0
\r
3 * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
\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
12 * The above copyright notice and this permission notice shall be included in all
\r
13 * copies or substantial portions of the Software.
\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
22 * http://aws.amazon.com/freertos
\r
23 * http://www.FreeRTOS.org
\r
28 * @brief Data types.
\r
30 * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
\r
33 #ifndef _FREERTOS_POSIX_TYPES_H_
\r
34 #define _FREERTOS_POSIX_TYPES_H_
\r
36 /* C standard library includes. */
\r
39 /* FreeRTOS types include */
\r
40 #include "FreeRTOS_POSIX_types.h"
\r
43 * @brief Used for system times in clock ticks or CLOCKS_PER_SEC.
\r
45 * Enabled/disabled by posixconfigENABLE_CLOCK_T.
\r
47 #if !defined( posixconfigENABLE_CLOCK_T ) || ( posixconfigENABLE_CLOCK_T == 1 )
\r
48 typedef uint32_t clock_t;
\r
52 * @brief Used for clock ID type in the clock and timer functions.
\r
54 * Enabled/disabled by posixconfigENABLE_CLOCKID_T.
\r
56 #if !defined( posixconfigENABLE_CLOCKID_T ) || ( posixconfigENABLE_CLOCKID_T == 1 )
\r
57 typedef int clockid_t;
\r
61 * @brief Used for some file attributes.
\r
63 * Enabled/disabled by posixconfigENABLE_MODE_T.
\r
65 #if !defined( posixconfigENABLE_MODE_T ) || ( posixconfigENABLE_MODE_T == 1 )
\r
70 * @brief Used for process IDs and process group IDs.
\r
72 * Enabled/disabled by posixconfigENABLE_PID_T.
\r
74 #if !defined( posixconfigENABLE_PID_T ) || ( posixconfigENABLE_PID_T == 1 )
\r
79 * @brief Used to identify a thread attribute object.
\r
81 * Enabled/disabled by posixconfigENABLE_PTHREAD_ATTR_T.
\r
83 #if !defined( posixconfigENABLE_PTHREAD_ATTR_T ) || ( posixconfigENABLE_PTHREAD_ATTR_T == 1 )
\r
84 typedef PthreadAttrType_t pthread_attr_t;
\r
88 * @brief Used to identify a barrier.
\r
90 * Enabled/disabled by posixconfigENABLE_PTHREAD_BARRIER_T.
\r
92 #if !defined( posixconfigENABLE_PTHREAD_BARRIER_T ) || ( posixconfigENABLE_PTHREAD_BARRIER_T == 1 )
\r
93 typedef PthreadBarrierType_t pthread_barrier_t;
\r
97 * @brief Used to define a barrier attributes object.
\r
99 typedef void * pthread_barrierattr_t;
\r
102 * @brief Used for condition variables.
\r
104 * Enabled/disabled by posixconfigENABLE_PTHREAD_COND_T.
\r
106 #if !defined( posixconfigENABLE_PTHREAD_COND_T ) || ( posixconfigENABLE_PTHREAD_COND_T == 1 )
\r
107 typedef PthreadCondType_t pthread_cond_t;
\r
111 * @brief Used to identify a condition attribute object.
\r
113 * Enabled/disabled by posixconfigENABLE_PTHREAD_CONDATTR_T.
\r
115 #if !defined( posixconfigENABLE_PTHREAD_CONDATTR_T ) || ( posixconfigENABLE_PTHREAD_CONDATTR_T == 1 )
\r
116 typedef void * pthread_condattr_t;
\r
120 * @brief Used for mutexes.
\r
122 * Enabled/disabled by posixconfigENABLE_PTHREAD_MUTEX_T.
\r
124 #if !defined( posixconfigENABLE_PTHREAD_MUTEX_T ) || ( posixconfigENABLE_PTHREAD_MUTEX_T == 1 )
\r
125 typedef PthreadMutexType_t pthread_mutex_t;
\r
129 * @brief Used to identify a mutex attribute object.
\r
131 * Enabled/disabled by posixconfigENABLE_PTHREAD_MUTEXATTR_T.
\r
133 #if !defined( posixconfigENABLE_PTHREAD_MUTEXATTR_T ) || ( posixconfigENABLE_PTHREAD_MUTEXATTR_T == 1 )
\r
134 typedef PthreadMutexAttrType_t pthread_mutexattr_t;
\r
138 * @brief Used to identify a thread.
\r
140 * Enabled/disabled by posixconfigENABLE_PTHREAD_T.
\r
142 #if !defined( posixconfigENABLE_PTHREAD_T ) || ( posixconfigENABLE_PTHREAD_T == 1 )
\r
143 typedef void * pthread_t;
\r
147 * @brief Used for a count of bytes or an error indication.
\r
149 * Enabled/disabled by posixconfigENABLE_SSIZE_T.
\r
151 #if !defined( posixconfigENABLE_SSIZE_T ) || ( posixconfigENABLE_SSIZE_T == 1 )
\r
152 typedef int ssize_t;
\r
156 * @brief Used for time in seconds.
\r
158 * Enabled/disabled by posixconfigENABLE_TIME_T.
\r
160 #if !defined( posixconfigENABLE_TIME_T ) || ( posixconfigENABLE_TIME_T == 1 )
\r
161 typedef int64_t time_t;
\r
165 * @brief Used for timer ID returned by timer_create().
\r
167 * Enabled/disabled by posixconfigENABLE_TIMER_T.
\r
169 #if !defined( posixconfigENABLE_TIMER_T ) || ( posixconfigENABLE_TIMER_T == 1 )
\r
170 typedef void * timer_t;
\r
174 * @brief Used for time in microseconds.
\r
176 * Enabled/disabled by posixconfigENABLE_USECONDS_T.
\r
178 #if !defined( posixconfigENABLE_USECONDS_T ) || ( posixconfigENABLE_USECONDS_T == 1 )
\r
179 typedef unsigned long useconds_t;
\r
183 * @brief Used for file sizes.
\r
185 * Enabled/disabled by posixconfigENABLE_OFF_T.
\r
187 #if !defined( posixconfigENABLE_OFF_T ) || ( posixconfigENABLE_OFF_T == 1 )
\r
188 typedef long int off_t;
\r
191 #endif /* ifndef _FREERTOS_POSIX_TYPES_H_ */
\r