mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 09:07:46 -04:00
suggestions implemented
This commit is contained in:
parent
aebba2bcd3
commit
f2e3d1b0e0
2 changed files with 6 additions and 8 deletions
|
@ -799,8 +799,8 @@ void vTaskDelay( const TickType_t xTicksToDelay ) PRIVILEGED_FUNCTION;
|
||||||
* same xTimeIncrement parameter value will cause the task to execute with
|
* same xTimeIncrement parameter value will cause the task to execute with
|
||||||
* a fixed interface period.
|
* a fixed interface period.
|
||||||
*
|
*
|
||||||
* @param xWasDelayed Can be used to check whether the task was actually delayed.
|
* @return Value which can be used to check whether the task was actually delayed.
|
||||||
* Will be set to pdTRUE if the task way delayed and to pdFALSE otherwise.
|
* Will be pdTRUE if the task way delayed and pdFALSE otherwise.
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
<pre>
|
<pre>
|
||||||
|
@ -824,7 +824,8 @@ void vTaskDelay( const TickType_t xTicksToDelay ) PRIVILEGED_FUNCTION;
|
||||||
* \defgroup vTaskDelayUntil vTaskDelayUntil
|
* \defgroup vTaskDelayUntil vTaskDelayUntil
|
||||||
* \ingroup TaskCtrl
|
* \ingroup TaskCtrl
|
||||||
*/
|
*/
|
||||||
void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement, BaseType_t * xWasDelayed ) PRIVILEGED_FUNCTION;
|
BaseType_t xTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) PRIVILEGED_FUNCTION;
|
||||||
|
#define vTaskDelayUntil ( pxPreviousWakeTime, xTimeIncrement ) xTaskDelayUntil ( ( xPreviousWakeTime ), ( xTimeIncrement ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* task. h
|
* task. h
|
||||||
|
|
7
tasks.c
7
tasks.c
|
@ -1251,7 +1251,7 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB )
|
||||||
|
|
||||||
#if ( INCLUDE_vTaskDelayUntil == 1 )
|
#if ( INCLUDE_vTaskDelayUntil == 1 )
|
||||||
|
|
||||||
void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement, BaseType_t * xWasDelayed )
|
BaseType_t xTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement )
|
||||||
{
|
{
|
||||||
TickType_t xTimeToWake;
|
TickType_t xTimeToWake;
|
||||||
BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE;
|
BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE;
|
||||||
|
@ -1329,10 +1329,7 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB )
|
||||||
mtCOVERAGE_TEST_MARKER();
|
mtCOVERAGE_TEST_MARKER();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(xWasDelayed != NULL)
|
return xShouldDelay;
|
||||||
{
|
|
||||||
*xWasDelayed = xShouldDelay;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* INCLUDE_vTaskDelayUntil */
|
#endif /* INCLUDE_vTaskDelayUntil */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue