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_MODE | 0x0001 | /* OBSOLETE: tasks always in sup mode */ |
| VX_UNBREAKABLE | 0x0002 | /* INTERNAL: breakpoints ignored */ |
| VX_DEALLOC_STACK | 0x0004 | /* INTERNAL: deallocate stack */ |
| VX_FP_TASK | 0x0008 | /* 1 = f-point coprocessor support */ |
| VX_STDIO | 0x0010 | /* OBSOLETE: need not be set for stdio*/ |
| VX_ADA_DEBUG | 0x0020 | /* 1 = VADS debugger support */ |
| VX_FORTRAN | 0x0040 | /* 1 = NKR FORTRAN support * |
| VX_PRIVATE_ENV | 0x0080 | /* 1 = private environment variables */ |
| VX_NO_STACK_FILL | 0x0100 | /* 1 = avoid stack fill of 0xee */ |
Related Information
Historical Number
111970364
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21119756