Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Interrupts Class Reference

This class represents the interrupt descriptor table (IDT), and allows callers to register and unregister interrupt handlers. More...

#include <irq.h>

Collaboration diagram for Interrupts:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void init ()
void register_handler (unsigned char int_num, Int_handler &handler)
void unregister_handler (unsigned char int_num, Int_handler &handler)
void print ()

Protected Attributes

Int_descriptor int_table [INTERRUPT_COUNT]

Static Protected Attributes

const Size ISR_SIZE = 9

Detailed Description

This class represents the interrupt descriptor table (IDT), and allows callers to register and unregister interrupt handlers.

There can be multiple handlers be interrupt. If a particular handler returns true when called, that indicates a context switch is requested.


Member Function Documentation

void Interrupts::init  ) 
 

Create an interrupt descriptor table and enable system interrupts.

void Interrupts::print  ) 
 

Print interrupt handler information.

void Interrupts::register_handler unsigned char  int_num,
Int_handler handler
 

Add a handler for a particular interrupt.

void Interrupts::unregister_handler unsigned char  int_num,
Int_handler handler
 

Remove a handler for a particular interrupt.


Member Data Documentation

Int_descriptor Interrupts::int_table[INTERRUPT_COUNT] [protected]
 

const Size Interrupts::ISR_SIZE = 9 [static, protected]
 

2 pushes (4 bytes) + 1 jmp (5 bytes)


The documentation for this class was generated from the following files:

Torsion Operating System, Copyright (C) 2000-2004 Dan Helfman