JanosVM v0.6.0 Java API Documentation: Class SignalSet
edu.utah.janosvm.kit.comm.amiga
Class SignalSet
java.lang.Object
|
+--edu.utah.janosvm.kit.comm.amiga.SignalSet
public final class SignalSet extends java.lang.Object
A SignalSet is a JanosVM implementation of the Amiga's signal system.
Basically, it provides a simple, low level, low bandwidth mechanism for
threads to communicate with each other.
Method Summary
int
allocate ()
void
allocate (int bit)
void
release (int bit)
long
setSignal (long newMask)
void
signal (int bit)
java.lang.String
toString ()
long
waitFor (long mask)
Wait for one or more of the signals in the mask to be received.
long
waitFor (long mask,
long timeout)
Wait for one or more of the signals in the mask to be received, or
for a timeout.
Methods inherited from class java.lang.Object
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait
MAXIMUM_SIGNAL_COUNT
public static final int MAXIMUM_SIGNAL_COUNT
SignalSet
public SignalSet ()
allocate
public int allocate ()
Returns: A newly allocated signal number. Throws: Throws - an OutOfSignalsError if there are no more signal bits
available.
allocate
public void allocate (int bit)
Parameters: bit
- Allocate the given signal bit.
release
public void release (int bit)
Parameters: bit
- Release the allocated signal bit.
waitFor
public long waitFor (long mask,
long timeout)
Wait for one or more of the signals in the mask to be received, or
for a timeout.
Parameters: mask
- The mask of signals to wait on.timeout
- The number of milliseconds to wait for signals.Returns: The mask of signals received, which will be a subset of the
`mask' parameter.
waitFor
public long waitFor (long mask)
Wait for one or more of the signals in the mask to be received.
Parameters: mask
- The mask of signals to wait on.Returns: The mask of signals received, which will be a subset of the
`mask' parameter.
signal
public void signal (int bit)
Parameters: bit
- The signal bit number to send.
setSignal
public long setSignal (long newMask)
toString
public java.lang.String toString ()
Overrides: toString in class java.lang.Object
This documentation is Copyright (C) 2000-2002 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions. Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/ Generated on Mar 17, 2002