File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -96,15 +96,11 @@ uintptr_t z_arm_pendsv_c(uintptr_t exc_ret)
9696
9797 /* restore mode */
9898 IF_ENABLED (CONFIG_USERSPACE , ({
99- CONTROL_Type ctrl = {.w = __get_CONTROL ()};
100- /* exit privileged state when returning to thread mode. */
101- ctrl .b .nPRIV = 0 ;
102- /* __set_CONTROL inserts an ISB which is may not be necessary here
103- * (stack pointer may not be touched), but it's recommended to avoid
104- * executing pre-fetched instructions with the previous privilege.
105- */
106- __set_CONTROL (ctrl .w | current -> arch .mode );
107- }));
99+ CONTROL_Type ctrl = {.w = __get_CONTROL ()};
100+ /* exit privileged state when returing to thread mode. */
101+ ctrl .b .nPRIV = 0 ;
102+ __set_CONTROL (ctrl .w | current -> arch .mode );
103+ }));
108104
109105 return exc_ret ;
110106}
You can’t perform that action at this time.
0 commit comments