|
| 1 | +/* |
| 2 | + * Amazon FreeRTOS+POSIX V1.0.4 |
| 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 | + |
| 26 | +/** |
| 27 | + * @file FreeRTOS_POSIX_portable.h |
| 28 | + * @brief STM32 + GNU tools Port-specific configuration of FreeRTOS+POSIX. |
| 29 | + */ |
| 30 | + |
| 31 | +#ifndef _FREERTOS_POSIX_PORTABLE_H_ |
| 32 | +#define _FREERTOS_POSIX_PORTABLE_H_ |
| 33 | + |
| 34 | +/* |
| 35 | + * GNU Tools for STM32 already defines timespec and itimerspec. |
| 36 | + */ |
| 37 | +#define posixconfigENABLE_TIMESPEC 0 |
| 38 | +#include <sys/_timespec.h> |
| 39 | + |
| 40 | +#define posixconfigENABLE_ITIMERSPEC 0 |
| 41 | +#include <sys/timespec.h> |
| 42 | + |
| 43 | +/* |
| 44 | + * GNU Tools for STM32 already defines mode_t and clockit_t. |
| 45 | + */ |
| 46 | +#define posixconfigENABLE_MODE_T 0 |
| 47 | +#define posixconfigENABLE_CLOCKID_T 0 |
| 48 | + |
| 49 | +/* Disable timer_t from GNU Tools to avoid compilation warnings |
| 50 | + * of pointer to integer conversion. |
| 51 | + */ |
| 52 | +#define __timer_t_defined 1 |
| 53 | + |
| 54 | +/* Define _SYS__PTHREADTYPES_H_ to disable GNU Tools for STM32 |
| 55 | + * definitions that differ from FreeRTOS+POSIX implementation. |
| 56 | + */ |
| 57 | +#define _SYS__PTHREADTYPES_H_ |
| 58 | +#include <sys/types.h> |
| 59 | + |
| 60 | +/* Define posixconfigENABLE_SCHED_PARAM to skip our sched_param. |
| 61 | + * Excluding the entire header with _FREERTOS_POSIX_SCHED_H_ |
| 62 | + * would miss sched_get_priority_max/min and sched_yield. |
| 63 | + */ |
| 64 | +#define posixconfigENABLE_SCHED_PARAM 0 |
| 65 | +#include <sys/sched.h> |
| 66 | + |
| 67 | + |
| 68 | +#endif /* _FREERTOS_POSIX_PORTABLE_H_ */ |
0 commit comments