Skip to content

Commit 5833659

Browse files
Patatermeriac
authored andcommitted
RTX: Run unprivileged if uVisor is present
As priviliged threading is incompatible with uVisor
1 parent a076f9a commit 5833659

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ uint32_t const os_tickfreq = OS_CLOCK;
122122
uint16_t const os_tickus_i = OS_CLOCK/1000000;
123123
uint16_t const os_tickus_f = (((uint64_t)(OS_CLOCK-1000000*(OS_CLOCK/1000000)))<<16)/1000000;
124124
uint32_t const os_trv = OS_TRV;
125+
#if defined(FEATURE_UVISOR) && defined(TARGET_UVISOR_SUPPORTED)
126+
uint8_t const os_flags = 0;
127+
#else /* defined(FEATURE_UVISOR) && defined(TARGET_UVISOR_SUPPORTED) */
125128
uint8_t const os_flags = OS_RUNPRIV;
129+
#endif /* defined(FEATURE_UVISOR) && defined(TARGET_UVISOR_SUPPORTED) */
126130

127131
/* Export following defines to uVision debugger. */
128132
__USED uint32_t const CMSIS_RTOS_API_Version = osCMSIS;

0 commit comments

Comments
 (0)