mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Change the Win32 port layer so it doesn't use the traceTASK_DELETE macro, but instead the new portCLEAN_UP_TCB macro.
This commit is contained in:
parent
8baa0ac171
commit
bbbdd9c393
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.1.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.1.1-rc1 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
|
@ -77,7 +77,6 @@ static void prvProcessSimulatedInterrupts( void );
|
|||
* Interrupt handlers used by the kernel itself. These are executed from the
|
||||
* simulated interrupt handler thread.
|
||||
*/
|
||||
static unsigned long prvProcessDeleteThreadInterrupt( void );
|
||||
static unsigned long prvProcessYieldInterrupt( void );
|
||||
static unsigned long prvProcessTickInterrupt( void );
|
||||
|
||||
|
@ -204,7 +203,6 @@ xThreadState *pxThreadState;
|
|||
/* Install the interrupt handlers used by the scheduler itself. */
|
||||
vPortSetInterruptHandler( portINTERRUPT_YIELD, prvProcessYieldInterrupt );
|
||||
vPortSetInterruptHandler( portINTERRUPT_TICK, prvProcessTickInterrupt );
|
||||
vPortSetInterruptHandler( portINTERRUPT_DELETE_THREAD, prvProcessDeleteThreadInterrupt );
|
||||
|
||||
/* Create the events and mutexes that are used to synchronise all the
|
||||
threads. */
|
||||
|
@ -270,12 +268,6 @@ xThreadState *pxThreadState;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static unsigned long prvProcessDeleteThreadInterrupt( void )
|
||||
{
|
||||
return pdTRUE;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static unsigned long prvProcessYieldInterrupt( void )
|
||||
{
|
||||
return pdTRUE;
|
||||
|
@ -361,15 +353,7 @@ void *pvObjectList[ 2 ];
|
|||
{
|
||||
/* Suspend the old thread. */
|
||||
pxThreadState = ( xThreadState *) *( ( unsigned long * ) pvOldCurrentTCB );
|
||||
|
||||
if( ( ulSwitchRequired & ( 1 << portINTERRUPT_DELETE_THREAD ) ) != pdFALSE )
|
||||
{
|
||||
TerminateThread( pxThreadState->pvThread, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
SuspendThread( pxThreadState->pvThread );
|
||||
}
|
||||
|
||||
/* Obtain the state of the task now selected to enter the
|
||||
Running state. */
|
||||
|
@ -387,15 +371,6 @@ void vPortDeleteThread( void *pvTaskToDelete )
|
|||
{
|
||||
xThreadState *pxThreadState;
|
||||
|
||||
if( pvTaskToDelete == pxCurrentTCB )
|
||||
{
|
||||
/* The task is deleting itself, and so the thread that is running now
|
||||
is also to be deleted. This has to be deferred until this thread is
|
||||
no longer running, so its done in the simulated interrupt handler thread. */
|
||||
vPortGenerateSimulatedInterrupt( portINTERRUPT_DELETE_THREAD );
|
||||
}
|
||||
else
|
||||
{
|
||||
WaitForSingleObject( pvInterruptEventMutex, INFINITE );
|
||||
|
||||
/* Find the handle of the thread being deleted. */
|
||||
|
@ -404,7 +379,6 @@ xThreadState *pxThreadState;
|
|||
|
||||
ReleaseMutex( pvInterruptEventMutex );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortEndScheduler( void )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.1.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.1.1-rc1 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
|
@ -84,7 +84,7 @@
|
|||
#define portYIELD() vPortGenerateSimulatedInterrupt( portINTERRUPT_YIELD )
|
||||
|
||||
void vPortDeleteThread( void *pvThreadToDelete );
|
||||
#define traceTASK_DELETE( pxTCB ) vPortDeleteThread( pxTCB )
|
||||
#define portCLEAN_UP_TCB( pxTCB ) vPortDeleteThread( pxTCB )
|
||||
#define portDISABLE_INTERRUPTS()
|
||||
#define portENABLE_INTERRUPTS()
|
||||
|
||||
|
@ -102,7 +102,6 @@ void vPortExitCritical( void );
|
|||
|
||||
#define portINTERRUPT_YIELD ( 0UL )
|
||||
#define portINTERRUPT_TICK ( 1UL )
|
||||
#define portINTERRUPT_DELETE_THREAD ( 2UL )
|
||||
|
||||
/*
|
||||
* Raise a simulated interrupt represented by the bit mask in ulInterruptMask.
|
||||
|
|
Loading…
Reference in a new issue