Main Page | Data Structures | File List | Globals | Related Pages

io.c File Reference

Implemention of the i/o syscalls. More...

#include <io.h>

Functions

int io_initialize ()
 Initialize the I/O interrupts.

void keyboard_handler (InterruptVector vector, Registers *registers)
 Initializes the keyboard interrupt.

int process_scode (void)
 Processess the scan from the character queue.

void getchar_wake_handler (Thread *thread, void *data)
 The handler function for getchar.

void getchar_handler (InterruptVector vector, Registers *registers)
 Gets a new char from the queue.

void readline_handler (InterruptVector vector, Registers *registers)
 Gets a newline from the queue.

void readline_wake_handler (Thread *thread, void *data)
 The handler function for readline.

void print_handler (InterruptVector vector, Registers *registers)
 Prints a line to the console.

void termcolor_handler (InterruptVector vector, Registers *registers)
 Changes the color of the console.

void setcursor_handler (InterruptVector vector, Registers *registers)
 Sets the cursor position on the console.

void getcursor_handler (InterruptVector vector, Registers *registers)
 Gets the cursor position on the console.

void insert (int ch)
 Inserts new character into the queue.


Variables

int back
int front
int curr_size
char buffer [KEYBOARD_BUFFER_SIZE]
char rl_buffer [KEYBOARD_BUFFER_SIZE]
int rl_index
int rl_thread
Resource keyboardResource


Detailed Description

Implemention of the i/o syscalls.

This file provides the implementation for i/o system calls.

Author:
Lee Salzman (lsalzman)

Hassaan Moin Khan (hkhan)

Bug:
No known bugs.

Function Documentation

void getchar_handler InterruptVector  vector,
Registers *  registers
 

Gets a new char from the queue.

Its the getchar interrupt handler

Parameters:
vector The syscall interrupt
registers The syscall registers
Returns:
Void

void getchar_wake_handler Thread *  thread,
void *  data
 

The handler function for getchar.

Handles the getchar syscall and thread waiting on a resourse that have been woken up

Parameters:
therad The thread being woken up
data Paramaters to the function
Returns:
Void

void getcursor_handler InterruptVector  vector,
Registers *  registers
 

Gets the cursor position on the console.

Its the get_cursor_pos interrupt handler

Parameters:
vector The syscall interrupt
registers The syscall registers
Returns:
Void

void insert int  c  ) 
 

Inserts new character into the queue.

Adds new characters to the back of the queue

Parameters:
c The character to be added to the queue
Returns:
Void

int io_initialize  ) 
 

Initialize the I/O interrupts.

Installs the I/O interrups

Parameters:
none 
Returns:
returns 0 on success and 1 on failure

void keyboard_handler InterruptVector  vector,
Registers *  registers
 

Initializes the keyboard interrupt.

Its the keyboard interrupt handler

Parameters:
vector The syscall interrupt
registers The syscall registers
Returns:
Void

void print_handler InterruptVector  vector,
Registers *  registers
 

Prints a line to the console.

Its the print interrupt handler

Parameters:
vector The syscall interrupt
registers The syscall registers
Returns:
Void

int process_scode void   ) 
 

Processess the scan from the character queue.

Removes a character from the queue

Parameters:
Void 
Returns:
returns the value of the scancode

void readline_handler InterruptVector  vector,
Registers *  registers
 

Gets a newline from the queue.

Its ths readline interrupt handler

Parameters:
vector The syscall interrupt
registers The syscall registers
Returns:
Void

void readline_wake_handler Thread *  thread,
void *  data
 

The handler function for readline.

Handles the readline syscall and thread waiting on a resourse that have been woken up

Parameters:
therad The thread being woken up
data Paramaters to the function
Returns:
Void

void setcursor_handler InterruptVector  vector,
Registers *  registers
 

Sets the cursor position on the console.

Its the get_cursor_pos interrupt handler

Parameters:
vector The syscall interrupt
registers The syscall registers
Returns:
Void

void termcolor_handler InterruptVector  vector,
Registers *  registers
 

Changes the color of the console.

Its the settermcolor interrupt handler

Parameters:
vector The syscall interrupt
registers The syscall registers
Returns:
Void


Generated on Fri Apr 9 21:59:16 2004 for 15-410 Project 3 by doxygen 1.3.2