mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
FreeRTOS source:
- Major refactor to consolidate the multiple places where a task is removed from a ready list and placed in a delay list into a single function, reducing code size, and enabling the easy addition of up-coming functionality. - Replace the enum used for task notification states with a uint8_t to reduce the TCB struct size with some compilers, and allow additional members to be added without increasing its size. - Rearrange FreeRTOS.h so all INCLUDE_ defaults are grouped together.
This commit is contained in:
parent
42e73b9b8f
commit
2acc8f2c99
4 changed files with 234 additions and 418 deletions
|
@ -56,7 +56,7 @@ extern int uiInEventGroupSetBitsFromISR;
|
|||
#define TRACE_CPU_CLOCK_HZ configCPU_CLOCK_HZ /* Defined in "FreeRTOSConfig.h" */
|
||||
|
||||
#if (SELECTED_PORT == PORT_ARM_CortexM)
|
||||
|
||||
|
||||
/* Uses CMSIS API */
|
||||
|
||||
#define TRACE_SR_ALLOC_CRITICAL_SECTION() int __irq_status;
|
||||
|
@ -571,8 +571,8 @@ void* prvTraceGetCurrentTaskHandle(void);
|
|||
|
||||
/* Called on vTaskDelayUntil - note the use of FreeRTOS variable xTimeToWake */
|
||||
#undef traceTASK_DELAY_UNTIL
|
||||
#define traceTASK_DELAY_UNTIL() \
|
||||
trcKERNEL_HOOKS_TASK_DELAY(TASK_DELAY_UNTIL, pxCurrentTCB, xTimeToWake); \
|
||||
#define traceTASK_DELAY_UNTIL( xTickTimeToWake ) \
|
||||
trcKERNEL_HOOKS_TASK_DELAY(TASK_DELAY_UNTIL, pxCurrentTCB, ( xTickTimeToWake)); \
|
||||
trcKERNEL_HOOKS_SET_TASK_INSTANCE_FINISHED();
|
||||
|
||||
#if (INCLUDE_OBJECT_DELETE == 1)
|
||||
|
@ -819,7 +819,7 @@ else \
|
|||
|
||||
#undef traceTASK_NOTIFY_TAKE
|
||||
#define traceTASK_NOTIFY_TAKE() \
|
||||
if (pxCurrentTCB->eNotifyState == eNotified) \
|
||||
if (pxCurrentTCB->ucNotifyState == taskNOTIFICATION_RECEIVED) \
|
||||
vTraceStoreKernelCallWithParam(TRACE_TASK_NOTIFY_TAKE, TRACE_CLASS_TASK, uxTaskGetTaskNumber(pxCurrentTCB), xTicksToWait); \
|
||||
else \
|
||||
vTraceStoreKernelCallWithParam(TRACE_TASK_NOTIFY_TAKE_FAILED, TRACE_CLASS_TASK, uxTaskGetTaskNumber(pxCurrentTCB), xTicksToWait);
|
||||
|
@ -831,7 +831,7 @@ else \
|
|||
|
||||
#undef traceTASK_NOTIFY_WAIT
|
||||
#define traceTASK_NOTIFY_WAIT() \
|
||||
if (pxCurrentTCB->eNotifyState == eNotified) \
|
||||
if (pxCurrentTCB->ucNotifyState == taskNOTIFICATION_RECEIVED) \
|
||||
vTraceStoreKernelCallWithParam(TRACE_TASK_NOTIFY_WAIT, TRACE_CLASS_TASK, uxTaskGetTaskNumber(pxCurrentTCB), xTicksToWait); \
|
||||
else \
|
||||
vTraceStoreKernelCallWithParam(TRACE_TASK_NOTIFY_WAIT_FAILED, TRACE_CLASS_TASK, uxTaskGetTaskNumber(pxCurrentTCB), xTicksToWait);
|
||||
|
@ -848,7 +848,7 @@ else \
|
|||
#undef traceTASK_NOTIFY_FROM_ISR
|
||||
#define traceTASK_NOTIFY_FROM_ISR() \
|
||||
vTraceStoreKernelCall(TRACE_TASK_NOTIFY_FROM_ISR, TRACE_CLASS_TASK, uxTaskGetTaskNumber(xTaskToNotify));
|
||||
|
||||
|
||||
#undef traceTASK_NOTIFY_GIVE_FROM_ISR
|
||||
#define traceTASK_NOTIFY_GIVE_FROM_ISR() \
|
||||
vTraceStoreKernelCall(TRACE_TASK_NOTIFY_GIVE_FROM_ISR, TRACE_CLASS_TASK, uxTaskGetTaskNumber(xTaskToNotify));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue