mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Merge branch 'main' into update-pxcurrentTCB
This commit is contained in:
commit
730ae6b1e3
|
@ -472,7 +472,8 @@ void vClearInterruptMask( __attribute__( ( unused ) ) uint32_t ulMask ) /* __att
|
|||
" ldr r3, =%1 \n"
|
||||
" cmp r2, r3 \n"
|
||||
" beq system_call_exit \n"
|
||||
" b vPortSVCHandler_C \n"
|
||||
" ldr r3, =vPortSVCHandler_C \n"
|
||||
" bx r3 \n"
|
||||
" \n"
|
||||
" system_call_enter: \n"
|
||||
" push {lr} \n"
|
||||
|
@ -508,11 +509,13 @@ void vClearInterruptMask( __attribute__( ( unused ) ) uint32_t ulMask ) /* __att
|
|||
" \n"
|
||||
" stacking_used_psp: \n"
|
||||
" mrs r0, psp \n"
|
||||
" b vPortSVCHandler_C \n"
|
||||
" ldr r3, =vPortSVCHandler_C \n"
|
||||
" bx r3 \n"
|
||||
" \n"
|
||||
" stacking_used_msp: \n"
|
||||
" mrs r0, msp \n"
|
||||
" b vPortSVCHandler_C \n"
|
||||
" ldr r3, =vPortSVCHandler_C \n"
|
||||
" bx r3 \n"
|
||||
" \n"
|
||||
" .align 4 \n"
|
||||
);
|
||||
|
|
|
@ -547,6 +547,20 @@ void vPortCloseRunningThread( void * pvTaskToDelete,
|
|||
/* This is called from a critical section, which must be exited before the
|
||||
* thread stops. */
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
/* Record that a yield is pending so that the next tick interrupt switches
|
||||
* out this thread regardless of the value of configUSE_PREEMPTION. This is
|
||||
* needed when a task deletes itself - the taskYIELD_WITHIN_API within
|
||||
* vTaskDelete does not get called because this function never returns. If
|
||||
* we do not pend portINTERRUPT_YIELD here, the next task is not scheduled
|
||||
* when configUSE_PREEMPTION is set to 0. */
|
||||
if( pvInterruptEventMutex != NULL )
|
||||
{
|
||||
WaitForSingleObject( pvInterruptEventMutex, INFINITE );
|
||||
ulPendingInterrupts |= ( 1 << portINTERRUPT_YIELD );
|
||||
ReleaseMutex( pvInterruptEventMutex );
|
||||
}
|
||||
|
||||
CloseHandle( pxThreadState->pvYieldEvent );
|
||||
ExitThread( 0 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue