Skip to content

Commit 416dc86

Browse files
cfriedtChristopher Friedt
authored andcommitted
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>
1 parent 609d6ea commit 416dc86

File tree

1 file changed

+2
-2
lines changed
  • subsys/portability/cmsis_rtos_v2

1 file changed

+2
-2
lines changed

subsys/portability/cmsis_rtos_v2/thread.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ static const osThreadAttr_t init_thread_attrs = {
2626

2727
static sys_dlist_t thread_list;
2828
static struct cv2_thread cv2_thread_pool[CONFIG_CMSIS_V2_THREAD_MAX_COUNT];
29-
static uint32_t thread_num;
30-
static uint32_t thread_num_dynamic;
29+
static atomic_t thread_num;
30+
static atomic_t thread_num_dynamic;
3131

3232
#if CONFIG_CMSIS_V2_THREAD_DYNAMIC_MAX_COUNT != 0
3333
static K_THREAD_STACK_ARRAY_DEFINE(cv2_thread_stack_pool, \

0 commit comments

Comments
 (0)