|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
javax.realtime.RealtimeThread
javax.realtime.NoHeapRealtimeThread
A NoHeapRealtimeThread
is a specialized form of RealtimeThread
. Because an instance of NoHeapRealtimeThread
may immediately preempt any implemented
garbage collector logic contained in its RealtimeThread.run()
is never
allowed to allocate or reference any object allocated in the heap
nor is it even allowed to manipulate any reference toany object in
the heap. For example, if a and b are objects in immortal memory,
b.p is reference to an object on the heap, and a.p is type
compatible with b.p, then a NoHeapRealtimeThread is not allowed to
execute anything like the following:
a.p = b.p; b.p =
null;
Thus,it is always safe for a NoHeapRealtimeThread
to
interrupt the garbage collector at any time, without waiting for
the end of the garbage collection cycle or a defined preemption
point. Due to these restrictions, a
NoHeapRealtimeThread
object must be placed in a memory
area such that thread logic may unexceptionally access instance
variables and such that Java methods on Thread
(e.g., enumerate and join) complete normally except where execution
would cause access violations. The constructors of
NoHeapRealtimeThread
require a reference to ScopedMemory
or ImmortalMemory
. When the thread is
started, all execution occurs in the scope of the given memory
area. Thus, all memory allocation performed with the new operator
is taken from this given area. Parameters for constructors may be
null . In such cases the default value will be the default value
set for the particular type by the associated instance of Scheduler
.
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
NoHeapRealtimeThread(SchedulingParameters schedulingParam,
MemoryArea memoryArea)
Creates a new NoHeapRealtimeThread instance with the
given characteristics. |
|
NoHeapRealtimeThread(SchedulingParameters schedulingParam,
ReleaseParameters releaseParam,
MemoryArea memoryArea)
Creates a new NoHeapRealtimeThread instance with the
given characteristics and a Runnable . |
|
NoHeapRealtimeThread(SchedulingParameters schedulingParam,
ReleaseParameters releaseParam,
MemoryParameters memoryParam,
MemoryArea memoryArea,
ProcessingGroupParameters groupParam,
Runnable logic)
Creates a new NoHeapRealtimeThread instance with the
given characteristics and a Runnable . |
Method Summary | |
void |
start()
Performs several checks, then starts this NoHeapRealtimeThread if it is startable. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, stop, stop, suspend, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public NoHeapRealtimeThread(SchedulingParameters schedulingParam, MemoryArea memoryArea) throws IllegalArgumentException
NoHeapRealtimeThread
instance with the
given characteristics.
schedulingParam
- The SchedulingParameters
associated with this (and possibly other instances of
NoHeapRealtimeThread).memoryArea
- The MemoryArea
associated with this.
public NoHeapRealtimeThread(SchedulingParameters schedulingParam, ReleaseParameters releaseParam, MemoryArea memoryArea) throws IllegalArgumentException
NoHeapRealtimeThread
instance with the
given characteristics and a Runnable
.
schedulingParam
- The SchedulingParameters
associated with this (and possibly other instances of
NoHeapRealtimeThread).releaseParam
- The ReleaseParameters
associated
with this (and possibly other instances of NoHeapRealtimeThread
).memoryArea
- The MemoryArea
associated with this.
public NoHeapRealtimeThread(SchedulingParameters schedulingParam, ReleaseParameters releaseParam, MemoryParameters memoryParam, MemoryArea memoryArea, ProcessingGroupParameters groupParam, Runnable logic) throws IllegalArgumentException
NoHeapRealtimeThread
instance with the
given characteristics and a Runnable
.
schedulingParam
- The SchedulingParameters
associated with this (and possibly other instances of
NoHeapRealtimeThread).releaseParam
- The ReleaseParameters
associated
with this (and possibly other instances of NoHeapRealtimeThread
).memoryParam
- The MemoryParameters
associated with
this (and possibly other instances of NoHeapRealtimeThread
).memoryArea
- The MemoryArea
associated with this.groupParam
- -The ProcessingGroupParameters
associated
with this (and possibly other instances of NoHeapRealtimeThread
).logic
- the logic for this thread.
Method Detail |
public void start()
NoHeapRealtimeThread
if it is startable. No parameters or the
NoHeapRealtimeThread
object itself may be allocated
from the heap.
start
in class RealtimeThread
MemoryAccessError
- if any parameter or this
is allocated in the heap, or if this thread was requested to
run in the heap.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |