Commit Graph

5 Commits

Author SHA1 Message Date
Christopher Friedt 829eec9ec5 portability: cmsis: use correct type for atomics
With the change of `atomic_t` from `int` to `long` there
were a few places where there was some type aliasing
occuring.

Update CMSIS to use `atomic_t` rather than `int` for all
atomic operations.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-11-15 09:59:01 -05:00
Chen Peng1 0f63d1135c cmsis_rtos_v1: fix thread instances management.
add a bitarray into struct osThreadDef_t to indicate whether the
thread is used or not, then we can get the first available thread
by searching this array when creating a new thread, and update this
array to add a free thread when terminating a thread.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2021-09-09 12:01:06 -04:00
Chen Peng1 34d2ca613f cmsis_rots_v1: fix for clearing signal flags in osSignalWait.
we use flag 0 in osSignalWait function to wait for
any single signal flag, but with this 0 flag,
it won't clear thread signal results as expected,
we need to check whether signal flag is 0 firstly.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2021-08-12 17:30:03 -04:00
Anas Nashif 3b3e858c50 portability: move cmsis api headers
Move cmsis OS api headers under include/portability. Those are not
libraries and only serve to provide a level of abstraction using the
CMSIS OS APIs to existing Zephyr interfaces.

Removed one level and put them directly under include/portability.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-20 08:45:05 -04:00
Anas Nashif a15f32f58c portability: move cmsis APIs to subsys/portability
Move cmsis OS apis under subsystem/portability. Those are not libraries
and only serve to provide a level of abstraction using the CMSIS OS APIs
to existing Zephyr interfaces.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-20 08:45:05 -04:00