Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

SynchConsoleOutput Class Reference

The following class defines synchronized output to a console device. More...

#include <synchconsole.h>

Inheritance diagram for SynchConsoleOutput::

CallBackObj List of all members.

Public Methods

 SynchConsoleOutput (char *outputFile)
 Initialize the console device. More...

 ~SynchConsoleOutput ()
void PutChar (char ch)
 Write a character, waiting if necessary. More...


Private Methods

void CallBack ()
 called when a keystroke is available. More...


Private Attributes

ConsoleOutputconsoleOutput
 the hardware display. More...

Locklock
 only one writer at a time. More...

SemaphorewaitFor
 wait for callBack. More...


Detailed Description

The following class defines synchronized output to a console device.

Definition at line 41 of file synchconsole.h.


Constructor & Destructor Documentation

SynchConsoleOutput::SynchConsoleOutput ( char * outputFile )
 

Initialize the console device.

SynchConsoleOutput::SynchConsoleOutput Initialize synchronized access to the console display

"outputFile" -- if NULL, use stdout as console device otherwise, read from this file

Definition at line 77 of file synchconsole.cc.

SynchConsoleOutput::~SynchConsoleOutput ( )
 

SynchConsoleOutput::~SynchConsoleOutput Deallocate data structures for synchronized access to the keyboard

Definition at line 89 of file synchconsole.cc.


Member Function Documentation

void SynchConsoleOutput::CallBack ( ) [private, virtual]
 

called when a keystroke is available.

SynchConsoleOutput::CallBack Interrupt handler called when it's safe to send the next character can be sent to the display.

Reimplemented from CallBackObj.

Definition at line 117 of file synchconsole.cc.

void SynchConsoleOutput::PutChar ( char ch )
 

Write a character, waiting if necessary.

SynchConsoleOutput::PutChar Write a character to the console display, waiting if necessary.

Definition at line 102 of file synchconsole.cc.

Referenced by UserProgKernel::SelfTest().


Member Data Documentation

ConsoleOutput * SynchConsoleOutput::consoleOutput [private]
 

the hardware display.

Definition at line 49 of file synchconsole.h.

Lock * SynchConsoleOutput::lock [private]
 

only one writer at a time.

Definition at line 50 of file synchconsole.h.

Semaphore * SynchConsoleOutput::waitFor [private]
 

wait for callBack.

Definition at line 51 of file synchconsole.h.


The documentation for this class was generated from the following files:
Generated at Wed Jul 4 11:32:24 2001 for Nachos by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001