Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

irq_alloc.h

Go to the documentation of this file.
00001 // AUTOMATICALLY GENERATED -- DO NOT EDIT!         -*- c++ -*-
00002 
00003 #ifndef irq_alloc_h
00004 #define irq_alloc_h
00005 
00006 //
00007 // INTERFACE definition follows 
00008 //
00009 
00010 
00011 class Receiver;
00012 
00013 class Irq_alloc
00014 {
00015 
00016 public:
00017   virtual bool alloc(Receiver *t, bool ack_in_kernel) = 0;
00018   virtual bool free(Receiver *t) = 0;
00019   virtual void acknowledge() = 0;
00020 
00021   static void init();
00022 
00023   Irq_alloc( unsigned irq );
00024 
00025 protected:
00026   Receiver *_irq_thread;
00027   bool _ack_in_kernel;
00028 
00029 private:
00030   static Irq_alloc *irqs[];
00031 
00032 public:
00033 
00034   static Irq_alloc *lookup( unsigned irq );
00035   static void register_irq( unsigned irq, Irq_alloc *i );
00036 
00037 
00038 public:  
00039   inline Receiver * owner() const;
00040   
00041   static void free_all(Receiver *rcv);
00042 };
00043 
00044 //
00045 // IMPLEMENTATION includes follow (for use by inline functions)
00046 //
00047 
00048 
00049 #include "config.h"
00050 
00051 //
00052 // IMPLEMENTATION of inline functions (and needed classes)
00053 //
00054 
00055 
00056 
00057 
00058 inline Receiver *
00059 Irq_alloc::owner() const
00060 { return _irq_thread; }
00061 
00062 
00063 
00064 inline Irq_alloc *Irq_alloc::lookup( unsigned irq )
00065 {
00066   if(irq < Config::Max_num_irqs) 
00067     return irqs[irq];    
00068   else
00069     return 0;
00070 }
00071 
00072 
00073 
00074 inline void Irq_alloc::register_irq( unsigned irq, Irq_alloc *i )
00075 {
00076   if(irq < Config::Max_num_irqs) 
00077     irqs[irq] = i;
00078 }
00079 
00080 
00081 
00082 inline Irq_alloc::Irq_alloc(unsigned irqnum)
00083   : _irq_thread (0)
00084 {
00085   register_irq(irqnum, this);
00086 }
00087 
00088 #endif // irq_alloc_h

Generated on Mon Sep 26 14:20:10 2005 for Fiasco by  doxygen 1.4.2