]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/GCC/ARM_CA9/portmacro.h
Completely re-generate the Zynq 7000 demo using the 2016.1 SDK tools.
[freertos] / FreeRTOS / Source / portable / GCC / ARM_CA9 / portmacro.h
index a4c2e1ca4ab55f2c83d6b95d4ea34a170234e630..f13c624a3d7aa6dd25b062480d15dcbfdadf9620 100644 (file)
@@ -161,9 +161,18 @@ macros is used. */
 handler for whichever peripheral is used to generate the RTOS tick. */\r
 void FreeRTOS_Tick_Handler( void );\r
 \r
-/* Any task that uses the floating point unit MUST call vPortTaskUsesFPU()\r
-before any floating point instructions are executed. */\r
-void vPortTaskUsesFPU( void );\r
+/* If configUSE_TASK_FPU_SUPPORT is set to 1 (or left undefined) then tasks are\r
+created without an FPU context and must call vPortTaskUsesFPU() to give\r
+themselves an FPU context before using any FPU instructions.  If\r
+configUSE_TASK_FPU_SUPPORT is set to 2 then all tasks will have an FPU context\r
+by default. */\r
+#if( configUSE_TASK_FPU_SUPPORT != 2 )\r
+       void vPortTaskUsesFPU( void );\r
+#else\r
+       /* Each task has an FPU context already, so define this function away to\r
+       nothing to prevent it being called accidentally. */\r
+       #define vPortTaskUsesFPU()\r
+#endif\r
 #define portTASK_USES_FLOATING_POINT() vPortTaskUsesFPU()\r
 \r
 #define portLOWEST_INTERRUPT_PRIORITY ( ( ( uint32_t ) configUNIQUE_INTERRUPT_PRIORITIES ) - 1UL )\r