mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-01-18 07:40:27 -05:00
Ensure that the configMAX_SYSCALL_INTERRUPT_PRIORITY setting works with all possible values.
This commit is contained in:
parent
9133ceb44d
commit
8fc0c27ea5
3 changed files with 39 additions and 24 deletions
|
|
@ -204,7 +204,13 @@ unsigned portBASE_TYPE uxSavedStatusRegister;
|
|||
|
||||
asm volatile ( "di" );
|
||||
uxSavedStatusRegister = _CP0_GET_STATUS() | 0x01;
|
||||
_CP0_SET_STATUS( ( uxSavedStatusRegister | ( configMAX_SYSCALL_INTERRUPT_PRIORITY << portIPL_SHIFT ) ) );
|
||||
/* This clears the IPL bits, then sets them to
|
||||
configMAX_SYSCALL_INTERRUPT_PRIORITY. This function should not be called
|
||||
from an interrupt that has a priority above
|
||||
configMAX_SYSCALL_INTERRUPT_PRIORITY so, when used correctly, the action
|
||||
can only result in the IPL being unchanged or raised, and therefore never
|
||||
lowered. */
|
||||
_CP0_SET_STATUS( ( ( uxSavedStatusRegister & ( ~portALL_IPL_BITS ) ) ) | ( configMAX_SYSCALL_INTERRUPT_PRIORITY << portIPL_SHIFT ) );
|
||||
|
||||
return uxSavedStatusRegister;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue