|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnachos.kernel.devices.InterruptHandler
nachos.kernel.threads.test.AlarmTest
public class AlarmTest
This class demonstrates the use of timers. Some timers are created, then they are cancelled. If there is something else using the CPU, then the timers might go off before being cancelled.
Field Summary | |
---|---|
private static nachos.machine.Timer |
t1
Timer instances created for the test. |
private static nachos.machine.Timer |
t2
Timer instances created for the test. |
private static nachos.machine.Timer |
t3
Timer instances created for the test. |
private int |
which
Integer that identifies which instance this is. |
Constructor Summary | |
---|---|
AlarmTest(int w)
Initialize a handler for a timer instance. |
Method Summary | |
---|---|
void |
serviceDevice()
Interrupt service routine called when the timer expires. |
static void |
start(java.lang.String[] args)
Entry point for the test. |
Methods inherited from class nachos.kernel.devices.InterruptHandler |
---|
handleInterrupt, yieldOnReturn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static nachos.machine.Timer t1
private static nachos.machine.Timer t2
private static nachos.machine.Timer t3
private int which
Constructor Detail |
---|
public AlarmTest(int w)
w
- Integer that identifies the instance.Method Detail |
---|
public static void start(java.lang.String[] args)
args
- Command-line arguments -- currently ignored.public void serviceDevice()
serviceDevice
in class InterruptHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |