mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Fix formatting
This commit is contained in:
parent
f0f8e9e743
commit
4f51ec1a30
32
timers.c
32
timers.c
|
@ -989,11 +989,11 @@
|
||||||
traceTIMER_COMMAND_RECEIVED( pxTimer, xMessage.xMessageID, xMessage.u.xTimerParameters.xMessageValue );
|
traceTIMER_COMMAND_RECEIVED( pxTimer, xMessage.xMessageID, xMessage.u.xTimerParameters.xMessageValue );
|
||||||
|
|
||||||
/* In this case the xTimerListsWereSwitched parameter is not used, but
|
/* In this case the xTimerListsWereSwitched parameter is not used, but
|
||||||
* it must be present in the function call. prvSampleTimeNow() must be
|
* it must be present in the function call. prvSampleTimeNow() must be
|
||||||
* called after the message is received from xTimerQueue so there is no
|
* called after the message is received from xTimerQueue so there is no
|
||||||
* possibility of a higher priority task adding a message to the message
|
* possibility of a higher priority task adding a message to the message
|
||||||
* queue with a time that is ahead of the timer daemon task (because it
|
* queue with a time that is ahead of the timer daemon task (because it
|
||||||
* pre-empted the timer daemon task after the xTimeNow value was set). */
|
* pre-empted the timer daemon task after the xTimeNow value was set). */
|
||||||
xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched );
|
xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched );
|
||||||
|
|
||||||
switch( xMessage.xMessageID )
|
switch( xMessage.xMessageID )
|
||||||
|
@ -1008,7 +1008,7 @@
|
||||||
if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE )
|
if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE )
|
||||||
{
|
{
|
||||||
/* The timer expired before it was added to the active
|
/* The timer expired before it was added to the active
|
||||||
* timer list. Process it now. */
|
* timer list. Process it now. */
|
||||||
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0U )
|
if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0U )
|
||||||
{
|
{
|
||||||
prvReloadTimer( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow );
|
prvReloadTimer( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow );
|
||||||
|
@ -1042,11 +1042,11 @@
|
||||||
configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) );
|
configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) );
|
||||||
|
|
||||||
/* The new period does not really have a reference, and can
|
/* The new period does not really have a reference, and can
|
||||||
* be longer or shorter than the old one. The command time is
|
* be longer or shorter than the old one. The command time is
|
||||||
* therefore set to the current time, and as the period cannot
|
* therefore set to the current time, and as the period cannot
|
||||||
* be zero the next expiry time can only be in the future,
|
* be zero the next expiry time can only be in the future,
|
||||||
* meaning (unlike for the xTimerStart() case above) there is
|
* meaning (unlike for the xTimerStart() case above) there is
|
||||||
* no fail case that needs to be handled here. */
|
* no fail case that needs to be handled here. */
|
||||||
( void ) prvInsertTimerInActiveList( pxTimer, ( xTimeNow + pxTimer->xTimerPeriodInTicks ), xTimeNow, xTimeNow );
|
( void ) prvInsertTimerInActiveList( pxTimer, ( xTimeNow + pxTimer->xTimerPeriodInTicks ), xTimeNow, xTimeNow );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1054,8 +1054,8 @@
|
||||||
#if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
#if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||||
{
|
{
|
||||||
/* The timer has already been removed from the active list,
|
/* The timer has already been removed from the active list,
|
||||||
* just free up the memory if the memory was dynamically
|
* just free up the memory if the memory was dynamically
|
||||||
* allocated. */
|
* allocated. */
|
||||||
if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) == ( uint8_t ) 0 )
|
if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) == ( uint8_t ) 0 )
|
||||||
{
|
{
|
||||||
vPortFree( pxTimer );
|
vPortFree( pxTimer );
|
||||||
|
@ -1068,9 +1068,9 @@
|
||||||
#else /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */
|
#else /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */
|
||||||
{
|
{
|
||||||
/* If dynamic allocation is not enabled, the memory
|
/* If dynamic allocation is not enabled, the memory
|
||||||
* could not have been dynamically allocated. So there is
|
* could not have been dynamically allocated. So there is
|
||||||
* no need to free the memory - just mark the timer as
|
* no need to free the memory - just mark the timer as
|
||||||
* "not active". */
|
* "not active". */
|
||||||
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
|
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
|
||||||
}
|
}
|
||||||
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
|
||||||
|
|
Loading…
Reference in a new issue