]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Source/FreeRTOS-IoT-Libraries/abstractions/platform/freertos/include/platform/iot_platform_types_freertos.h
Correct an err in queue.c introduced when previously updating behaviour when queue...
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-IoT-Libraries / abstractions / platform / freertos / include / platform / iot_platform_types_freertos.h
1 /*\r
2  * Amazon FreeRTOS Platform V1.0.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 iot_platform_types_posix.h\r
28  * @brief Definitions of platform layer types on POSIX systems.\r
29  */\r
30 \r
31 #ifndef _IOT_PLATFORM_TYPES_AFR_H_\r
32 #define _IOT_PLATFORM_TYPES_AFR_H_\r
33 \r
34 #include "timers.h"\r
35 \r
36 typedef struct iot_mutex_internal\r
37 {\r
38     StaticSemaphore_t xMutex;      /**< FreeRTOS mutex. */\r
39     BaseType_t recursive;                /**< Type; used for indicating if this is reentrant or normal. */\r
40 } iot_mutex_internal_t;\r
41 \r
42 /**\r
43  * @brief The native mutex type on AFR systems.\r
44  */\r
45 typedef iot_mutex_internal_t _IotSystemMutex_t;\r
46 \r
47 typedef struct iot_sem_internal\r
48 {\r
49     StaticSemaphore_t xSemaphore;       /**< FreeRTOS semaphore. */\r
50 } iot_sem_internal_t;\r
51 \r
52 /**\r
53  * @brief The native semaphore type on AFR systems.\r
54  */\r
55 typedef iot_sem_internal_t _IotSystemSemaphore_t;\r
56 \r
57 /**\r
58  * @brief Holds information about an active detached thread so that we can\r
59  *        delete the FreeRTOS task when it completes\r
60  */\r
61 typedef struct threadInfo\r
62 {\r
63     void * pArgument;                 /**< @brief Argument to `threadRoutine`. */\r
64     void ( *threadRoutine )( void * );/**< @brief Thread function to run. */\r
65 } threadInfo_t;\r
66 \r
67 /**\r
68  * @brief Holds information about an active timer.\r
69  */\r
70 typedef struct timerInfo\r
71 {\r
72     TimerHandle_t timer;                    /**< @brief Underlying timer. */\r
73     void ( *threadRoutine )( void * );      /**< @brief Thread function to run on timer expiration. */\r
74     void * pArgument;                       /**< @brief First argument to threadRoutine. */\r
75     StaticTimer_t xTimerBuffer;             /**< Memory that holds the FreeRTOS timer. */\r
76     TickType_t xTimerPeriod;                /**< Period of this timer. */\r
77 } timerInfo_t;\r
78 \r
79 /**\r
80  * @brief Represents an #IotTimer_t on AFR systems.\r
81  */\r
82 typedef timerInfo_t _IotSystemTimer_t;\r
83 \r
84 #endif /* ifndef _IOT_PLATFORM_TYPES_POSIX_H_ */\r