Skip to content

Commit 72f03ad

Browse files
authored
Merge pull request #2259 from c1728p9/iar_fix
Fix MAIN_THREAD_ID check
2 parents c24e461 + 2d50c60 commit 72f03ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rtos/rtx/TARGET_CORTEX_M/cmsis_os.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@
8383
/* If os timers macro is set to 0, there's no timer thread created, therefore
8484
* main thread has tid 0x01
8585
*/
86-
#if (OS_TIMERS != 0)
87-
#define MAIN_THREAD_ID 0x02
88-
#else
86+
#if defined(OS_TIMERS) && (OS_TIMERS == 0)
8987
#define MAIN_THREAD_ID 0x01
88+
#else
89+
#define MAIN_THREAD_ID 0x02
9090
#endif
9191
#endif
9292

0 commit comments

Comments
 (0)