@Deprecated public class NoHeapRealtimeThread extends RealtimeThread
NoHeapRealtimeThread
is a specialized form of
RealtimeThread
. Because an instance of
NoHeapRealtimeThread
may immediately preempt any
implemented garbage collector, logic contained in its
run()
is never allowed to allocate or reference any
object allocated in the heap. At the byte-code level, it is illegal
for a reference to an object allocated in heap to appear on a
this realtime thread's operand stack.
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.
Constructor and Description |
---|
NoHeapRealtimeThread(SchedulingParameters scheduling,
MemoryArea area)
Deprecated.
Creates a realtime thread with the given
SchedulingParameters
and MemoryArea and default values for all other parameters. |
NoHeapRealtimeThread(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryArea area)
Deprecated.
Creates a realtime thread which may not use the heap with the given
SchedulingParameters , ReleaseParameters and
MemoryArea , and default values for all other parameters. |
NoHeapRealtimeThread(SchedulingParameters scheduling,
ReleaseParameters<?> release,
MemoryParameters memory,
MemoryArea area,
ProcessingGroupParameters group,
java.lang.Runnable logic)
Deprecated.
Creates a realtime thread with the given characteristics and a Runnable.
|
Modifier and Type | Method and Description |
---|---|
void |
start()
Deprecated.
Sets up the realtime thread's environment and starts it.
|
void |
startPeriodic(PhasingPolicy phasingPolicy)
Deprecated.
Starts the periodic thread with the specified phasing policy.
|
addIfFeasible, addToFeasibility, currentRealtimeThread, currentSchedulable, deschedule, deschedulePeriodic, getConfigurationParameters, getCurrentMemoryArea, getCurrentReleaseTime, getCurrentReleaseTime, getEffectiveStartTime, getEffectiveStartTime, getInitialMemoryAreaIndex, getMemoryArea, getMemoryAreaStackDepth, getMemoryParameters, getOuterMemoryArea, getProcessingGroupParameters, getReleaseParameters, getScheduler, getSchedulingParameters, interrupt, isInterrupted, mayUseHeap, release, removeFromFeasibility, reschedule, schedulePeriodic, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setMemoryParameters, setMemoryParametersIfFeasible, setProcessingGroupParameters, setProcessingGroupParametersIfFeasible, setReleaseParameters, setReleaseParametersIfFeasible, setScheduler, setScheduler, setScheduler, setSchedulingParameters, setSchedulingParametersIfFeasible, sleep, sleep, subsumes, waitForNextPeriod, waitForNextPeriodInterruptible, waitForNextRelease, waitForNextReleaseInterruptible
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isDaemon, setDaemon
public NoHeapRealtimeThread(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters group, java.lang.Runnable logic)
scheduling
- the SchedulingParameters associated with this (and
possibly other instances of Schedulable). When
scheduling is null
, the default is a copy of
the creator's scheduling parameters created in the
same memory area as the new NoHeapRealtimeThread.release
- the ReleaseParameters associated with this (and
possibly other instances of Schedulable). When release
is null, the default is a copy of the creator's
ReleaseParameters created in the same memory area as
the new NoHeapRealtimeThread.memory
- the MemoryParameters associated with this (and possibly
other instances of Schedulable). When memory is null, the
new NoHeapRealtimeThread will have a null value for its
MemoryParameters, and the amount or rate of memory
allocation is unrestricted.area
- the MemoryArea associated with this. When area is null, an
IllegalArgumentException is thrown.group
- the ProcessingGroupParameters associated with this (and
possibly other instances of Schedulable). When null, the
new NoHeapRealtimeThread will not be associated with any
processing group.logic
- the Runnable object whose run() method will serve as the
logic for the new NoHeapRealtimeThread. When logic is null,
the run() method in the new object will serve as its logic.java.lang.IllegalArgumentException
- when the parameters are not compatible
with the associated scheduler,
when area is null,
when area is heap memory,
when area, scheduling release, memory
or group is allocated in heap memory.
when this
is in heap memory,
or when logic is in heap memory.IllegalAssignmentError
- when the new NoHeapRealtimeThread instance
cannot hold references to non-null values
of the scheduling release, memory and group,
or when those parameters cannot hold a
reference to the new NoHeapRealtimeThread.public NoHeapRealtimeThread(SchedulingParameters scheduling, ReleaseParameters<?> release, MemoryArea area)
SchedulingParameters
, ReleaseParameters
and
MemoryArea
, and default values for all other parameters. This
constructor is equivalent to NoHeapRealtimeThread(scheduling,
release, null, area, null, null, null)
.public NoHeapRealtimeThread(SchedulingParameters scheduling, MemoryArea area)
SchedulingParameters
and MemoryArea
and default values for all other parameters.
This constructor is equivalent to
NoHeapRealtimeThread(scheduling, null, null, area, null,
null, null)
.
public void start()
RealtimeThread
ScopedMemory
.)
It is never legal to start a thread more than once. In
particular, a thread may not be restarted once it has completed
execution.start
in class RealtimeThread
public void startPeriodic(PhasingPolicy phasingPolicy) throws LateStartException
startPeriodic
in class RealtimeThread
phasingPolicy
- The phasing policy to be applied when the start
time given in the realtime thread's associated
PeriodicParameters
is in the past.LateStartException
- when the actual start
time is after the assigned start time and the phasing policy
is PhasingPolicy.STRICT_PHASING
.