mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Update flop.c and FreeRTOS.h to include a macro (and a default null implementation of the macro) that enables the flop tasks to register their need for a floating point context with the kernel.
This commit is contained in:
parent
b4efc0439f
commit
e08966c7e8
|
@ -132,6 +132,11 @@ volatile unsigned short *pusTaskCheckVariable;
|
||||||
volatile portDOUBLE dAnswer;
|
volatile portDOUBLE dAnswer;
|
||||||
short sError = pdFALSE;
|
short sError = pdFALSE;
|
||||||
|
|
||||||
|
/* Some ports require that tasks that use a hardware floating point unit
|
||||||
|
tell the kernel that they require a floating point context before any
|
||||||
|
floating point instructions are executed. */
|
||||||
|
portTASK_USES_FLOATING_POINT();
|
||||||
|
|
||||||
d1 = 123.4567;
|
d1 = 123.4567;
|
||||||
d2 = 2345.6789;
|
d2 = 2345.6789;
|
||||||
d3 = -918.222;
|
d3 = -918.222;
|
||||||
|
@ -184,6 +189,11 @@ volatile unsigned short *pusTaskCheckVariable;
|
||||||
volatile portDOUBLE dAnswer;
|
volatile portDOUBLE dAnswer;
|
||||||
short sError = pdFALSE;
|
short sError = pdFALSE;
|
||||||
|
|
||||||
|
/* Some ports require that tasks that use a hardware floating point unit
|
||||||
|
tell the kernel that they require a floating point context before any
|
||||||
|
floating point instructions are executed. */
|
||||||
|
portTASK_USES_FLOATING_POINT();
|
||||||
|
|
||||||
d1 = -389.38;
|
d1 = -389.38;
|
||||||
d2 = 32498.2;
|
d2 = 32498.2;
|
||||||
d3 = -2.0001;
|
d3 = -2.0001;
|
||||||
|
@ -238,6 +248,11 @@ const size_t xArraySize = 10;
|
||||||
size_t xPosition;
|
size_t xPosition;
|
||||||
short sError = pdFALSE;
|
short sError = pdFALSE;
|
||||||
|
|
||||||
|
/* Some ports require that tasks that use a hardware floating point unit
|
||||||
|
tell the kernel that they require a floating point context before any
|
||||||
|
floating point instructions are executed. */
|
||||||
|
portTASK_USES_FLOATING_POINT();
|
||||||
|
|
||||||
/* The variable this task increments to show it is still running is passed in
|
/* The variable this task increments to show it is still running is passed in
|
||||||
as the parameter. */
|
as the parameter. */
|
||||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||||
|
@ -295,6 +310,11 @@ const size_t xArraySize = 10;
|
||||||
size_t xPosition;
|
size_t xPosition;
|
||||||
short sError = pdFALSE;
|
short sError = pdFALSE;
|
||||||
|
|
||||||
|
/* Some ports require that tasks that use a hardware floating point unit
|
||||||
|
tell the kernel that they require a floating point context before any
|
||||||
|
floating point instructions are executed. */
|
||||||
|
portTASK_USES_FLOATING_POINT();
|
||||||
|
|
||||||
/* The variable this task increments to show it is still running is passed in
|
/* The variable this task increments to show it is still running is passed in
|
||||||
as the parameter. */
|
as the parameter. */
|
||||||
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
pusTaskCheckVariable = ( unsigned short * ) pvParameters;
|
||||||
|
|
|
@ -568,6 +568,10 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
|
||||||
#define configUSE_QUEUE_SETS 0
|
#define configUSE_QUEUE_SETS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef portTASK_USES_FLOATING_POINT
|
||||||
|
#define portTASK_USES_FLOATING_POINT()
|
||||||
|
#endif
|
||||||
|
|
||||||
/* For backward compatability. */
|
/* For backward compatability. */
|
||||||
#define eTaskStateGet eTaskGetState
|
#define eTaskStateGet eTaskGetState
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue