mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 09:07:46 -04:00
Merge branch 'master' into fix_posix_no_switching_after_task_ended
This commit is contained in:
commit
dbae07626f
1 changed files with 9 additions and 1 deletions
10
portable/ThirdParty/GCC/Posix/port.c
vendored
10
portable/ThirdParty/GCC/Posix/port.c
vendored
|
@ -62,6 +62,7 @@
|
||||||
/* Scheduler includes. */
|
/* Scheduler includes. */
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
|
#include "timers.h"
|
||||||
#include "utils/wait_for_event.h"
|
#include "utils/wait_for_event.h"
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -198,6 +199,13 @@ sigset_t xSignals;
|
||||||
sigwait( &xSignals, &iSignal );
|
sigwait( &xSignals, &iSignal );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Cancel the Idle task and free its resources */
|
||||||
|
vPortCancelThread( xTaskGetIdleTaskHandle() );
|
||||||
|
#if ( configUSE_TIMERS == 1 )
|
||||||
|
/* Cancel the Timer task and free its resources */
|
||||||
|
vPortCancelThread( xTimerGetTimerDaemonTaskHandle() );
|
||||||
|
#endif /* configUSE_TIMERS */
|
||||||
|
|
||||||
/* Restore original signal mask. */
|
/* Restore original signal mask. */
|
||||||
(void)pthread_sigmask( SIG_SETMASK, &xSchedulerOriginalSignalMask, NULL );
|
(void)pthread_sigmask( SIG_SETMASK, &xSchedulerOriginalSignalMask, NULL );
|
||||||
|
|
||||||
|
@ -406,6 +414,7 @@ Thread_t *pxThreadToCancel = prvGetThreadFromTask( pxTaskToDelete );
|
||||||
*/
|
*/
|
||||||
pthread_cancel( pxThreadToCancel->pthread );
|
pthread_cancel( pxThreadToCancel->pthread );
|
||||||
pthread_join( pxThreadToCancel->pthread, NULL );
|
pthread_join( pxThreadToCancel->pthread, NULL );
|
||||||
|
event_delete( pxThreadToCancel->ev );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -453,7 +462,6 @@ BaseType_t uxSavedCriticalNesting;
|
||||||
prvResumeThread( pxThreadToResume );
|
prvResumeThread( pxThreadToResume );
|
||||||
if ( pxThreadToSuspend->xDying )
|
if ( pxThreadToSuspend->xDying )
|
||||||
{
|
{
|
||||||
event_delete(pxThreadToSuspend->ev);
|
|
||||||
pthread_exit( NULL );
|
pthread_exit( NULL );
|
||||||
}
|
}
|
||||||
prvSuspendSelf( pxThreadToSuspend );
|
prvSuspendSelf( pxThreadToSuspend );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue