Skip to content

Commit

Permalink
Remove use of internal RTX types
Browse files Browse the repository at this point in the history
Make calls to cmsis-os to get thread state, stack size, and max stack
usage rather than accessing internal RTX data directly. Wrap RTX5
specific code in OS_BACKEND_RTX5.

Also refactor the code to use mbed types rather than RTX types:
os_timer_t -> mbed_rtos_storage_timer_t
os_event_flags_t -> mbed_rtos_storage_event_flags_t
osRtxMutex_t -> mbed_rtos_storage_thread_t
  • Loading branch information
c1728p9 authored and geky committed Aug 4, 2019
1 parent 13cadda commit d2820cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions equeue_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ extern "C" {
#include "semphr.h"
#elif defined(EQUEUE_PLATFORM_MBED)
#include "cmsis_os2.h"
#include "rtx_lib.h"
#include "mbed_rtos_storage.h"
#endif


Expand Down Expand Up @@ -116,7 +116,7 @@ typedef HANDLE equeue_sema_t;
#elif defined(EQUEUE_PLATFORM_MBED) && defined(MBED_CONF_RTOS_PRESENT)
typedef struct equeue_sema {
osEventFlagsId_t id;
os_event_flags_t mem;
mbed_rtos_storage_event_flags_t mem;
} equeue_sema_t;
#elif defined(EQUEUE_PLATFORM_MBED)
typedef volatile int equeue_sema_t;
Expand Down

0 comments on commit d2820cf

Please sign in to comment.