Skip to content

Commit

Permalink
portability: cmsis: use correct type for atomics
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cfriedt authored and nashif committed Nov 15, 2021
1 parent 7c6039a commit 829eec9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subsys/portability/cmsis_rtos_v2/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ static const osThreadAttr_t init_thread_attrs = {

static sys_dlist_t thread_list;
static struct cv2_thread cv2_thread_pool[CONFIG_CMSIS_V2_THREAD_MAX_COUNT];
static uint32_t thread_num;
static uint32_t thread_num_dynamic;
static atomic_t thread_num;
static atomic_t thread_num_dynamic;

#if CONFIG_CMSIS_V2_THREAD_DYNAMIC_MAX_COUNT != 0
static K_THREAD_STACK_ARRAY_DEFINE(cv2_thread_stack_pool, \
Expand Down

0 comments on commit 829eec9

Please sign in to comment.