Skip to content

Commit

Permalink
Add missing test file.
Browse files Browse the repository at this point in the history
We have had the build infrastructure for testing that the FreeRTOS
headers compile in C mode for a while, but I forgot to add the .c file
for the test.
  • Loading branch information
davidchisnall committed Jun 5, 2024
1 parent 64d8c26 commit 71ce352
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/ccompile-freertos-test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <FreeRTOS-Compat/FreeRTOS.h>

#if (CHERIOT_FREERTOS_SEMAPHORE + CHERIOT_FREERTOS_MUTEX + \
CHERIOT_FREERTOS_RECURSIVE_MUTEX) == 1
#if CHERIOT_FREERTOS_SEMAPHORE == 1
_Static_assert(sizeof(StaticSemaphore_t) == sizeof(struct CountingSemaphoreState);
#elif CHERIOT_FREERTOS_MUTEX == 1
_Static_assert(sizeof(StaticSemaphore_t) == sizeof(struct FlagLockState));
#else
_Static_assert(sizeof(StaticSemaphore_t) == sizeof(struct RecursiveMutexState));
#endif
#endif

0 comments on commit 71ce352

Please sign in to comment.