\r
static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-const char *const pcHeader = " State\tPriority\tStack\t#\r\n************************************************\r\n";\r
+const char *const pcHeader = " State Priority Stack #\r\n************************************************\r\n";\r
BaseType_t xSpacePadding;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
#define INCLUDE_vTaskPrioritySet 1\r
#define INCLUDE_uxTaskPriorityGet 1\r
#define INCLUDE_vTaskDelete 1\r
-#define INCLUDE_vTaskCleanUpResources 0\r
#define INCLUDE_vTaskSuspend 1\r
#define INCLUDE_vTaskDelayUntil 1\r
#define INCLUDE_vTaskDelay 1\r
MEMORY\r
{\r
microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr : ORIGIN = 0x00000050, LENGTH = 0x0003FFB0\r
+ mig_7series_0 : ORIGIN = 0x80000000, LENGTH = 0x40000000\r
}\r
\r
/* Specify the default entry point to the program */\r
*(.text)\r
*(.text.*)\r
*(.gnu.linkonce.t.*)\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.init : {\r
KEEP (*(.init))\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.fini : {\r
KEEP (*(.fini))\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.ctors : {\r
__CTOR_LIST__ = .;\r
KEEP (*(.ctors))\r
__CTOR_END__ = .;\r
___CTORS_END___ = .;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.dtors : {\r
__DTOR_LIST__ = .;\r
KEEP (*(.dtors))\r
PROVIDE(__DTOR_END__ = .);\r
PROVIDE(___DTORS_END___ = .);\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.rodata : {\r
__rodata_start = .;\r
*(.rodata.*)\r
*(.gnu.linkonce.r.*)\r
__rodata_end = .;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.sdata2 : {\r
. = ALIGN(8);\r
*(.gnu.linkonce.s2.*)\r
. = ALIGN(8);\r
__sdata2_end = .;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.sbss2 : {\r
__sbss2_start = .;\r
*(.sbss2.*)\r
*(.gnu.linkonce.sb2.*)\r
__sbss2_end = .;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.data : {\r
. = ALIGN(4);\r
*(.data.*)\r
*(.gnu.linkonce.d.*)\r
__data_end = .;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.got : {\r
*(.got)\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.got1 : {\r
*(.got1)\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.got2 : {\r
*(.got2)\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.eh_frame : {\r
*(.eh_frame)\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.jcr : {\r
*(.jcr)\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.gcc_except_table : {\r
*(.gcc_except_table)\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.sdata : {\r
. = ALIGN(8);\r
*(.sdata.*)\r
*(.gnu.linkonce.s.*)\r
__sdata_end = .;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.sbss (NOLOAD) : {\r
. = ALIGN(4);\r
*(.gnu.linkonce.sb.*)\r
. = ALIGN(8);\r
__sbss_end = .;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.tdata : {\r
__tdata_start = .;\r
*(.tdata.*)\r
*(.gnu.linkonce.td.*)\r
__tdata_end = .;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.tbss : {\r
__tbss_start = .;\r
*(.tbss.*)\r
*(.gnu.linkonce.tb.*)\r
__tbss_end = .;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.bss (NOLOAD) : {\r
. = ALIGN(4);\r
*(COMMON)\r
. = ALIGN(4);\r
__bss_end = .;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
_SDA_BASE_ = __sdata_start + ((__sbss_end - __sdata_start) / 2 );\r
\r
_heap_start = .;\r
. += _HEAP_SIZE;\r
_heap_end = .;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
.stack (NOLOAD) : {\r
_stack_end = .;\r
. = ALIGN(8);\r
_stack = .;\r
__stack = _stack;\r
-} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+} > mig_7series_0\r
\r
_end = .;\r
}\r
\r
#if defined( XPAR_MICROBLAZE_USE_ICACHE ) && ( XPAR_MICROBLAZE_USE_ICACHE != 0 )\r
{\r
+ Xil_ICacheInvalidate();\r
Xil_ICacheEnable();\r
}\r
#endif\r
\r
#if defined( XPAR_MICROBLAZE_USE_DCACHE ) && ( XPAR_MICROBLAZE_USE_DCACHE != 0 )\r
{\r
+ Xil_DCacheInvalidate();\r
Xil_DCacheEnable();\r
}\r
#endif\r
#define configUSE_APPLICATION_TASK_TAG 0\r
#endif\r
\r
+#ifndef configNUM_THREAD_LOCAL_STORAGE_POINTERS\r
+ #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0\r
+#endif\r
+\r
#ifndef INCLUDE_uxTaskGetStackHighWaterMark\r
#define INCLUDE_uxTaskGetStackHighWaterMark 0\r
#endif\r
#endif /* configUSE_APPLICATION_TASK_TAG ==1 */\r
#endif /* ifdef configUSE_APPLICATION_TASK_TAG */\r
\r
+#if( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )\r
+\r
+ /* Each task contains an array of pointers that is dimensioned by the\r
+ configNUM_THREAD_LOCAL_STORAGE_POINTERS setting in FreeRTOSConfig.h. The\r
+ kernel does not use the pointers itself, so the application writer can use\r
+ the pointers for any purpose they wish. The following two functions are\r
+ used to set and query a pointer respectively. */ \r
+ void vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void *pvValue );\r
+ void *pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, BaseType_t xIndex );\r
+\r
+#endif\r
+\r
/**\r
* task.h\r
* <pre>BaseType_t xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );</pre>\r
TaskHookFunction_t pxTaskTag;\r
#endif\r
\r
+ #if( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )\r
+ void *pvThreadLocalStoragePointers[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];\r
+ #endif\r
+\r
#if ( configGENERATE_RUN_TIME_STATS == 1 )\r
uint32_t ulRunTimeCounter; /*< Stores the amount of time the task has spent in the Running state. */\r
#endif\r
}\r
#endif /* portUSING_MPU_WRAPPERS */\r
\r
+ #if( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )\r
+ {\r
+ for( x = 0; x < ( UBaseType_t ) configNUM_THREAD_LOCAL_STORAGE_POINTERS; x++ )\r
+ {\r
+ pxTCB->pvThreadLocalStoragePointers[ x ] = NULL;\r
+ }\r
+ }\r
+ #endif\r
+\r
#if ( configUSE_TASK_NOTIFICATIONS == 1 )\r
{\r
pxTCB->ulNotifiedValue = 0;\r
}\r
/*-----------------------------------------------------------*/\r
\r
+#if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )\r
+\r
+ void vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void *pvValue )\r
+ {\r
+ TCB_t *pxTCB;\r
+\r
+ if( xIndex < configNUM_THREAD_LOCAL_STORAGE_POINTERS )\r
+ {\r
+ pxTCB = prvGetTCBFromHandle( xTaskToSet );\r
+ pxTCB->pvThreadLocalStoragePointers[ xIndex ] = pvValue;\r
+ }\r
+ }\r
+\r
+#endif /* configNUM_THREAD_LOCAL_STORAGE_POINTERS */\r
+/*-----------------------------------------------------------*/\r
+\r
+#if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )\r
+\r
+ void *pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, BaseType_t xIndex )\r
+ {\r
+ void *pvReturn = NULL;\r
+ TCB_t *pxTCB;\r
+\r
+ if( xIndex < configNUM_THREAD_LOCAL_STORAGE_POINTERS )\r
+ {\r
+ pxTCB = prvGetTCBFromHandle( xTaskToQuery );\r
+ pvReturn = pxTCB->pvThreadLocalStoragePointers[ xIndex ];\r
+ }\r
+ else\r
+ {\r
+ pvReturn = NULL;\r
+ }\r
+\r
+ return pvReturn;\r
+ }\r
+\r
+#endif /* configNUM_THREAD_LOCAL_STORAGE_POINTERS */\r
+/*-----------------------------------------------------------*/\r
+\r
#if ( portUSING_MPU_WRAPPERS == 1 )\r
\r
void vTaskAllocateMPURegions( TaskHandle_t xTaskToModify, const MemoryRegion_t * const xRegions )\r
{\r
/* The notified task has a priority above the currently\r
executing task so a yield is required. */\r
- portYIELD_WITHIN_API();\r
+ taskYIELD_IF_USING_PREEMPTION();\r
}\r
else\r
{\r