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

io.h

Go to the documentation of this file.
00001 
00010 #ifndef __KERN_IO_H__
00011 #define __KERN_IO_H__
00012 
00013 
00014 
00015 #include <x86/seg.h>      /* for install_user_segs() */
00016 #include <x86/pic.h>      /* for pic_init() */
00017 #include <x86/base_irq.h> /* for base_irq_master/slave */
00018 #include <x86/irq_list.h>
00019 #include <x86/proc_reg.h>
00020 #include <keyhelp.h>
00021 #include <interrupt.h>
00022 #include <interrupts.h>
00023 #include <list.h>
00024 #include <register.h>
00025 #include <syscall_int.h>
00026 #include <keyhelp.h>
00027 #include <vm.h>
00028 #include <thread.h>
00029 #include <scheduler.h>
00030 #include <console.h>
00031 #include <stdio.h>
00032 #include <string.h>
00033 
00034 /*The handle to the keyboard interrupt in the interrupt vector */
00035 #define KEYBOARD_INT INTERRUPT_VECTOR_INTERRUPTS+IRQ_KEYBOARD
00036 
00037 /*The buffer size for the input buffer */
00038 #define KEYBOARD_BUFFER_SIZE 4096
00039 
00040 /*Struct to get arguments for readline */
00041 struct rl{
00042   /*get the number of chars to read */
00043   int len;
00044   /*Points to there buffer where to put the chars once they've been read */
00045   char* buf;
00046 };
00047 
00048 /*Struct to hold the setcursor arguments */
00049 struct sc{
00050   /*holds the row number */
00051   int row;
00052   /*holds the col number */
00053   int col;
00054 };
00055 
00056 /*Struct to hold the getcursor arguments */
00057 struct gc{
00058   /*Pointer to the row */
00059   int *row;
00060   /*Pointer to the col */
00061   int *col;
00062 };
00063 
00064 
00073 int io_initialize();
00074 
00075 
00085 void keyboard_handler(InterruptVector vector, Registers *registers);
00086 
00087 
00088 
00098 void getchar_handler(InterruptVector vector, Registers *registers);
00099 
00100 
00110 void readline_handler(InterruptVector vector, Registers *registers);
00111 
00112 
00122 void termcolor_handler(InterruptVector vector, Registers *registers);
00123 
00124 
00134 void getcursor_handler(InterruptVector vector, Registers *registers);
00135 
00136 
00146 void setcursor_handler(InterruptVector vector, Registers *registers);
00147 
00157 void print_handler(InterruptVector vector, Registers *registers);
00158 
00159 
00168 int process_scode(void);
00169 
00170 
00180 void getchar_wake_handler(Thread* thread, void *data);
00181 
00182 
00192 void readline_wake_handler(Thread* thread, void *data);
00193 
00202 void insert(int c);
00203 
00204 
00205 #endif

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