IBM Support

Preserving Floating Point Support when Spawning a Task in Tornado VxWorks

Troubleshooting


Problem

This technote provides information on how IBM Rational Rose RealTime spawns VxWorks tasks (threads) using the Tornado VX_FP_TASK option. In the Target Run-Time Services (TargetRTS) library the RTThread constructor calls taskSpawn() and sets the options for the child task by doing a bitwise AND of the floating point coprocessor support bit with the options of the parent task. Therefore, child tasks will have the same floating point support setting as their parent task, and the other options bits will be cleared. This is the design intent of the Rose RealTime TargetRTS. Included in this technote are the relevant sections of the constructor for RTThread (TargetRTS) and taskLib.h (Tornado 2).

Resolving The Problem

The C++ TargetRTS can be found in the ROSERT_HOME/C++/TargetRTS directory where ROSERT_HOME indicates the location where Rose RealTime is installed.

The RTThread constructor can be found in:

ROSERT_HOME/C++/TargetRTS/src/target/TORNADO1/RTThread/ct.cc

The RTThread constructor calls taskSpawn() and sets the options for the child task using a bitwise AND of the floating point coprocessor support bit with the options of the parent task as indicated below:


RTThread Constructor Excerpt:

/* Extracted from RTThread/ct.cc */


 _info->tid = taskSpawn( (char *)job->name(),
    prio,
    options & VX_FP_TASK,
    stack_size,
    (FUNCPTR)thread_run,
    (int)job );


Tornado 2 "taskLib" Header Excerpt:

/* extracted from taskLib.h in the installation of Tornado 2 */


/* task option bits */

#define
VX_SUPERVISOR_MODE0x0001/* OBSOLETE: tasks always in sup mode */
VX_UNBREAKABLE0x0002/* INTERNAL: breakpoints ignored      */
VX_DEALLOC_STACK0x0004/* INTERNAL: deallocate stack         */
VX_FP_TASK0x0008/* 1 = f-point coprocessor support    */
VX_STDIO0x0010/* OBSOLETE: need not be set for stdio*/
VX_ADA_DEBUG0x0020/* 1 = VADS debugger support          */
VX_FORTRAN0x0040/* 1 = NKR FORTRAN support            *
VX_PRIVATE_ENV0x0080/* 1 = private environment variables  */
VX_NO_STACK_FILL0x0100/* 1 = avoid stack fill of 0xee       */






[{"Product":{"code":"SSSHKL","label":"Rational Rose RealTime"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"2002;2003","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

111970364

Document Information

Modified date:
16 June 2018

UID

swg21119756