FreeRTOS: POSIX
Return to main page ↑
types.h
Go to the documentation of this file.
1 /*
2  * FreeRTOS POSIX V1.2.0
3  * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy of
6  * this software and associated documentation files (the "Software"), to deal in
7  * the Software without restriction, including without limitation the rights to
8  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9  * the Software, and to permit persons to whom the Software is furnished to do so,
10  * subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in all
13  * copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  *
22  * http://aws.amazon.com/freertos
23  * http://www.FreeRTOS.org
24  */
25 
33 #ifndef _FREERTOS_POSIX_TYPES_H_
34 #define _FREERTOS_POSIX_TYPES_H_
35 
36 /* C standard library includes. */
37 #include <stdint.h>
38 
39 /* FreeRTOS types include */
40 #include "FreeRTOS_POSIX_types.h"
41 
48 #if !defined( posixconfigENABLE_CLOCK_T ) || ( posixconfigENABLE_CLOCK_T == 1 )
49  typedef uint32_t clock_t;
50 #endif
51 
58 #if !defined( posixconfigENABLE_CLOCKID_T ) || ( posixconfigENABLE_CLOCKID_T == 1 )
59  typedef int clockid_t;
60 #endif
61 
68 #if !defined( posixconfigENABLE_MODE_T ) || ( posixconfigENABLE_MODE_T == 1 )
69  typedef int mode_t;
70 #endif
71 
78 #if !defined( posixconfigENABLE_PID_T ) || ( posixconfigENABLE_PID_T == 1 )
79  typedef int pid_t;
80 #endif
81 
88 #if !defined( posixconfigENABLE_PTHREAD_ATTR_T ) || ( posixconfigENABLE_PTHREAD_ATTR_T == 1 )
89  typedef PthreadAttrType_t pthread_attr_t;
90 #endif
91 
98 #if !defined( posixconfigENABLE_PTHREAD_BARRIER_T ) || ( posixconfigENABLE_PTHREAD_BARRIER_T == 1 )
99  typedef PthreadBarrierType_t pthread_barrier_t;
100 #endif
101 
106 typedef void * pthread_barrierattr_t;
107 
114 #if !defined( posixconfigENABLE_PTHREAD_COND_T ) || ( posixconfigENABLE_PTHREAD_COND_T == 1 )
115  typedef PthreadCondType_t pthread_cond_t;
116 #endif
117 
124 #if !defined( posixconfigENABLE_PTHREAD_CONDATTR_T ) || ( posixconfigENABLE_PTHREAD_CONDATTR_T == 1 )
125  typedef void * pthread_condattr_t;
126 #endif
127 
134 #if !defined( posixconfigENABLE_PTHREAD_MUTEX_T ) || ( posixconfigENABLE_PTHREAD_MUTEX_T == 1 )
135  typedef PthreadMutexType_t pthread_mutex_t;
136 #endif
137 
144 #if !defined( posixconfigENABLE_PTHREAD_MUTEXATTR_T ) || ( posixconfigENABLE_PTHREAD_MUTEXATTR_T == 1 )
145  typedef PthreadMutexAttrType_t pthread_mutexattr_t;
146 #endif
147 
154 #if !defined( posixconfigENABLE_PTHREAD_T ) || ( posixconfigENABLE_PTHREAD_T == 1 )
155  typedef void * pthread_t;
156 #endif
157 
164 #if !defined( posixconfigENABLE_SSIZE_T ) || ( posixconfigENABLE_SSIZE_T == 1 )
165  typedef int ssize_t;
166 #endif
167 
174 #if !defined( posixconfigENABLE_TIME_T ) || ( posixconfigENABLE_TIME_T == 1 )
175  typedef int64_t time_t;
176 #endif
177 
184 #if !defined( posixconfigENABLE_TIMER_T ) || ( posixconfigENABLE_TIMER_T == 1 )
185  typedef void * timer_t;
186 #endif
187 
194 #if !defined( posixconfigENABLE_USECONDS_T ) || ( posixconfigENABLE_USECONDS_T == 1 )
195  typedef unsigned long useconds_t;
196 #endif
197 
204 #if !defined( posixconfigENABLE_OFF_T ) || ( posixconfigENABLE_OFF_T == 1 )
205  typedef long int off_t;
206 #endif
207 
208 #endif /* ifndef _FREERTOS_POSIX_TYPES_H_ */
int pid_t
Used for process IDs and process group IDs.
Definition: types.h:79
unsigned long useconds_t
Used for time in microseconds.
Definition: types.h:195
int64_t time_t
Used for time in seconds.
Definition: types.h:175
PthreadMutexAttrType_t pthread_mutexattr_t
Used to identify a mutex attribute object.
Definition: types.h:145
void * timer_t
Used for timer ID returned by timer_create().
Definition: types.h:185
PthreadMutexType_t pthread_mutex_t
Used for mutexes.
Definition: types.h:135
long int off_t
Used for file sizes.
Definition: types.h:205
void * pthread_barrierattr_t
Used to define a barrier attributes object.
Definition: types.h:106
int ssize_t
Used for a count of bytes or an error indication.
Definition: types.h:165
uint32_t clock_t
Used for system times in clock ticks or CLOCKS_PER_SEC.
Definition: types.h:49
void * pthread_condattr_t
Used to identify a condition attribute object.
Definition: types.h:125
int clockid_t
Used for clock ID type in the clock and timer functions.
Definition: types.h:59
PthreadBarrierType_t pthread_barrier_t
Used to identify a barrier.
Definition: types.h:99
PthreadCondType_t pthread_cond_t
Used for condition variables.
Definition: types.h:115
PthreadAttrType_t pthread_attr_t
Used to identify a thread attribute object.
Definition: types.h:89
int mode_t
Used for some file attributes.
Definition: types.h:69
void * pthread_t
Used to identify a thread.
Definition: types.h:155