IBM® Rational® Rhapsody® supports
multitasking using threads. Also known aslightweight
processes, threads are basic units of CPU utilization. Each
thread consists of a program counter, register set, and stack space.
It shares its code section, data section, and operating system resources,
such as open files and signals, with peer threads. If an RTOS does
not support multitasking using threads, the operating system adapter
written for that environment must provide it.
The
factory has two create thread operations that create two different
kinds of threads:
- createOMOSThread -
Creates a simple
thread. This thread is the most common case. Simple threads
are constructed in suspended mode by default. This means that the
thread does not start execution until you call start.
Otherwise, it might start execution immediately and try to access
variables or data that are not yet valid.
- createOMOSWrapperThread -
Creates
a wrapper thread. A wrapper thread is used to wrap an external
thread so it can be treated as one of the application threads on the
call stack. A wrapper thread can be suspended, resumed, have its priority
set, and participate in animation. Wrapper threads are used only for
instrumentation. They represent user-defined threads (threads defined
outside the Rational Rhapsody framework).