nachos.kernel.devices.test
Class ConsoleTest.ConsHandler

java.lang.Object
  extended by nachos.kernel.devices.InterruptHandler
      extended by nachos.kernel.devices.test.ConsoleTest.ConsHandler
All Implemented Interfaces:
nachos.machine.InterruptHandler
Enclosing class:
ConsoleTest

private static class ConsoleTest.ConsHandler
extends InterruptHandler

Console interrupt handler class.


Field Summary
private  Semaphore semaphore
          Semaphore used to awaken requesting thread.
 
Constructor Summary
ConsoleTest.ConsHandler(Semaphore s)
          Initialize a handler with a given semaphore to use to wake up the requesting thread when the I/O is complete.
 
Method Summary
 void serviceDevice()
          To service a Console interrupt, just wake up the thread that requested the I/O.
 
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

semaphore

private Semaphore semaphore
Semaphore used to awaken requesting thread.

Constructor Detail

ConsoleTest.ConsHandler

public ConsoleTest.ConsHandler(Semaphore s)
Initialize a handler with a given semaphore to use to wake up the requesting thread when the I/O is complete.

Parameters:
s - The semaphore to use to wake up the requesting thread.
Method Detail

serviceDevice

public void serviceDevice()
To service a Console interrupt, just wake up the thread that requested the I/O.

Specified by:
serviceDevice in class InterruptHandler