esp-idf/components/freertos/esp_additions/include/freertos_tasks_c_additions.h
Sudeep Mohanty 4846222102 freertos: update freertos folder structure to match upstream
The following changes have been made:
1. All FreeRTOS kernel source files are now placed in the
   freertos/FreeRTOS-Kernel folder to match with the upstream folder structure.
2. All kernel include files are now placed in freertos/FreeRTOS-Kernel/include.
3. All port files are now placed in freertos/FreeRTOS-Kernel/portable.
4. All additions/customizations are placed in freertos/esp_additions.
5. All other miscellaneous files (README, License files etc.) are moved to
   freertos/FreeRTOS-Kernel folder to match with the upstream.
6. Updated esp-cryptoauthlib to latest commit to resolve FreeRTOS
   include dependencies.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2021-10-29 12:05:13 +08:00

73 lines
1.5 KiB
C

/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
/**
* This file will be included in `tasks.c` file, thus, it must NOT be included
* by any (other) file.
* The functions below only consist in getters for the static variables in
* `tasks.c` file.
* The only source files that should call these functions are the ones in
* `/additions` directory.
*/
#if ( configENABLE_TASK_SNAPSHOT == 1 )
UBaseType_t pxTCBGetSize ( void )
{
return sizeof(TCB_t);
}
ListItem_t* pxTCBGetStateListItem ( void *pxTCB )
{
return &(((TCB_t*)pxTCB)->xStateListItem);
}
StackType_t* pxTCBGetStartOfStack ( void *pxTCB )
{
return (StackType_t*) ((TCB_t*)pxTCB)->pxStack;
}
StackType_t* pxTCBGetTopOfStack ( void *pxTCB )
{
return (StackType_t*) ((TCB_t*)pxTCB)->pxTopOfStack;
}
StackType_t* pxTCBGetEndOfStack ( void *pxTCB )
{
return (StackType_t*) ((TCB_t*)pxTCB)->pxEndOfStack;
}
List_t* pxListGetReadyTask ( UBaseType_t idx )
{
return &( pxReadyTasksLists[idx] );
}
List_t* pxListGetReadyPendingTask ( UBaseType_t idx )
{
return &( xPendingReadyList[idx] );
}
List_t* pxGetDelayedTaskList ( void ) {
return pxDelayedTaskList;
}
List_t* pxGetOverflowDelayedTaskList ( void ) {
return pxOverflowDelayedTaskList;
}
List_t* pxGetTasksWaitingTermination ( void ) {
return &xTasksWaitingTermination;
}
List_t* pxGetSuspendedTaskList ( void ) {
return &xSuspendedTaskList;
}
#endif