mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-11 13:54:16 -04:00
Modifications to correct behaviour when a task is blocked without specifying a wake time, and also introduce the xTaskGetSchedulerState() function.
This commit is contained in:
parent
94c94d3c0e
commit
7a8eb507a7
3 changed files with 142 additions and 49 deletions
|
@ -84,6 +84,10 @@
|
|||
#include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"
|
||||
#endif
|
||||
|
||||
#ifdef GCC_ARM7_ECLIPSE
|
||||
#include "portmacro.h"
|
||||
#endif
|
||||
|
||||
#ifdef ROWLEY_LPC23xx
|
||||
#include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"
|
||||
#endif
|
||||
|
|
|
@ -33,6 +33,12 @@
|
|||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes since V4.3.1:
|
||||
|
||||
+ Added xTaskGetSchedulerState() function.
|
||||
*/
|
||||
|
||||
#ifndef TASK_H
|
||||
#define TASK_H
|
||||
|
||||
|
@ -131,6 +137,10 @@ typedef struct xTIME_OUT
|
|||
*/
|
||||
#define taskENABLE_INTERRUPTS() portENABLE_INTERRUPTS()
|
||||
|
||||
/* Definitions returned by xTaskGetSchedulerState(). */
|
||||
#define taskSCHEDULER_NOT_STARTED 0
|
||||
#define taskSCHEDULER_RUNNING 1
|
||||
#define taskSCHEDULER_SUSPENDED 2
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* TASK CREATION API
|
||||
|
@ -940,7 +950,7 @@ void vTaskSetTimeOutState( xTimeOutType *pxTimeOut );
|
|||
* Compare the time status now with that previously captured to see if the
|
||||
* timeout has expired.
|
||||
*/
|
||||
portBASE_TYPE xTaskCheckForTimeOut( xTimeOutType *pxTimeOut, portTickType *pxTicksToWait );
|
||||
portBASE_TYPE xTaskCheckForTimeOut( xTimeOutType *pxTimeOut, portTickType * const pxTicksToWait );
|
||||
|
||||
/*
|
||||
* Shortcut used by the queue implementation to prevent unnecessary call to
|
||||
|
@ -948,6 +958,12 @@ portBASE_TYPE xTaskCheckForTimeOut( xTimeOutType *pxTimeOut, portTickType *pxTic
|
|||
*/
|
||||
void vTaskMissedYield( void );
|
||||
|
||||
/*
|
||||
* Returns the scheduler state as taskSCHEDULER_RUNNING,
|
||||
* taskSCHEDULER_NOT_STARTED or taskSCHEDULER_SUSPENDED.
|
||||
*/
|
||||
portBASE_TYPE xTaskGetSchedulerState( void );
|
||||
|
||||
#endif /* TASK_H */
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue