AWS IoT FreeRTOS+POSIX
types.h
Go to the documentation of this file.
1 /*
2  * Amazon FreeRTOS+POSIX V1.0.0
3  * Copyright (C) 2018 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 
43 #if !defined( posixconfigENABLE_CLOCK_T ) || ( posixconfigENABLE_CLOCK_T == 1 )
44  typedef uint32_t clock_t;
45 #endif
46 
51 #if !defined( posixconfigENABLE_CLOCKID_T ) || ( posixconfigENABLE_CLOCKID_T == 1 )
52  typedef int clockid_t;
53 #endif
54 
59 #if !defined( posixconfigENABLE_MODE_T ) || ( posixconfigENABLE_MODE_T == 1 )
60  typedef int mode_t;
61 #endif
62 
67 #if !defined( posixconfigENABLE_PID_T ) || ( posixconfigENABLE_PID_T == 1 )
68  typedef int pid_t;
69 #endif
70 
75 #if !defined( posixconfigENABLE_PTHREAD_ATTR_T ) || ( posixconfigENABLE_PTHREAD_ATTR_T == 1 )
76  typedef void * pthread_attr_t;
77 #endif
78 
82 typedef void * pthread_barrier_t;
83 
87 typedef void * pthread_barrierattr_t;
88 
93 #if !defined( posixconfigENABLE_PTHREAD_COND_T ) || ( posixconfigENABLE_PTHREAD_COND_T == 1 )
94  typedef void * pthread_cond_t;
95 #endif
96 
101 #if !defined( posixconfigENABLE_PTHREAD_CONDATTR_T ) || ( posixconfigENABLE_PTHREAD_CONDATTR_T == 1 )
102  typedef void * pthread_condattr_t;
103 #endif
104 
109 #if !defined( posixconfigENABLE_PTHREAD_MUTEX_T ) || ( posixconfigENABLE_PTHREAD_MUTEX_T == 1 )
110  typedef void * pthread_mutex_t;
111 #endif
112 
117 #if !defined( posixconfigENABLE_PTHREAD_MUTEXATTR_T ) || ( posixconfigENABLE_PTHREAD_MUTEXATTR_T == 1 )
118  typedef void * pthread_mutexattr_t;
119 #endif
120 
125 #if !defined( posixconfigENABLE_PTHREAD_T ) || ( posixconfigENABLE_PTHREAD_T == 1 )
126  typedef void * pthread_t;
127 #endif
128 
133 #if !defined( posixconfigENABLE_SSIZE_T ) || ( posixconfigENABLE_SSIZE_T == 1 )
134  typedef int ssize_t;
135 #endif
136 
141 #if !defined( posixconfigENABLE_TIME_T ) || ( posixconfigENABLE_TIME_T == 1 )
142  typedef int64_t time_t;
143 #endif
144 
149 #if !defined( posixconfigENABLE_TIMER_T ) || ( posixconfigENABLE_TIMER_T == 1 )
150  typedef void * timer_t;
151 #endif
152 
157 #if !defined( posixconfigENABLE_USECONDS_T ) || ( posixconfigENABLE_USECONDS_T == 1 )
158  typedef unsigned long useconds_t;
159 #endif
160 
161 #endif /* ifndef _FREERTOS_POSIX_TYPES_H_ */
void * pthread_barrier_t
Used to identify a barrier.
Definition: types.h:82
void * pthread_cond_t
Used for condition variables. Enabled/disabled by posixconfigENABLE_PTHREAD_COND_T.
Definition: types.h:94
void * pthread_mutexattr_t
Used to identify a mutex attribute object. Enabled/disabled by posixconfigENABLE_PTHREAD_MUTEXATTR_T...
Definition: types.h:118
void * pthread_attr_t
Used to identify a thread attribute object. Enabled/disabled by posixconfigENABLE_PTHREAD_ATTR_T.
Definition: types.h:76
int ssize_t
Used for a count of bytes or an error indication. Enabled/disabled by posixconfigENABLE_SSIZE_T.
Definition: types.h:134
int mode_t
Used for some file attributes. Enabled/disabled by posixconfigENABLE_MODE_T.
Definition: types.h:60
int clockid_t
Used for clock ID type in the clock and timer functions. Enabled/disabled by posixconfigENABLE_CLOCKI...
Definition: types.h:52
void * pthread_barrierattr_t
Used to define a barrier attributes object.
Definition: types.h:87
unsigned long useconds_t
Used for time in microseconds. Enabled/disabled by posixconfigENABLE_USECONDS_T.
Definition: types.h:158
uint32_t clock_t
Used for system times in clock ticks or CLOCKS_PER_SEC. Enabled/disabled by posixconfigENABLE_CLOCK_T...
Definition: types.h:44
void * timer_t
Used for timer ID returned by timer_create(). Enabled/disabled by posixconfigENABLE_TIMER_T.
Definition: types.h:150
void * pthread_mutex_t
Used for mutexes. Enabled/disabled by posixconfigENABLE_PTHREAD_MUTEX_T.
Definition: types.h:110
int pid_t
Used for process IDs and process group IDs. Enabled/disabled by posixconfigENABLE_PID_T.
Definition: types.h:68
void * pthread_condattr_t
Used to identify a condition attribute object. Enabled/disabled by posixconfigENABLE_PTHREAD_CONDATTR...
Definition: types.h:102
void * pthread_t
Used to identify a thread. Enabled/disabled by posixconfigENABLE_PTHREAD_T.
Definition: types.h:126
int64_t time_t
Used for time in seconds. Enabled/disabled by posixconfigENABLE_TIME_T.
Definition: types.h:142