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

irq.h

Go to the documentation of this file.
00001 // AUTOMATICALLY GENERATED -- DO NOT EDIT!         -*- c++ -*-
00002 
00003 #ifndef irq_h
00004 #define irq_h
00005 
00006 #include "sender.h"
00007 #include "irq_alloc.h"
00008 
00009 //
00010 // INTERFACE definition follows 
00011 //
00012 
00013 
00018 class Irq : public Irq_alloc, public Sender
00019 {
00020 
00021 private:
00022   Irq();                        // default constructors remain undefined
00023   Irq(Irq&);
00024 
00025 protected:
00026   int _queued;
00027 
00028 public:
00029 
00030   static Irq *lookup( unsigned irq );
00031 
00032 
00033 public:  
00037   explicit Irq(unsigned irqnum);
00038   
00039   inline int queued();
00040   
00046   virtual void ipc_receiver_ready();
00047   
00052   inline void maybe_acknowledge();
00053   
00055   inline void maybe_enable();
00056 
00057 private:  
00061   inline int consume();
00062 };
00063 
00064 extern unsigned pic_mask_master;
00065 extern unsigned pic_mask_slave;
00066 
00067 extern "C" void fast_ret_from_irq(void);
00068 
00069 //
00070 // IMPLEMENTATION includes follow (for use by inline functions)
00071 //
00072 
00073 
00074 #include "atomic.h"
00075 
00076 #include "pic.h"
00077 
00078 //
00079 // IMPLEMENTATION of inline functions (and needed classes)
00080 //
00081 
00082 
00083 
00084 
00085 inline int
00086 Irq::queued()
00087 {
00088   return _queued;
00089 }
00090 
00091 
00092 
00098 inline void
00099 Irq::maybe_acknowledge()
00100 {
00101   if (_ack_in_kernel)
00102     {
00103       unsigned irqnum = id().irq();
00104 
00105       Pic::disable_locked(irqnum);
00106       Pic::acknowledge_locked(irqnum);
00107     }
00108 }
00109 
00110  
00113 inline void
00114 Irq::maybe_enable()
00115 {
00116   if (EXPECT_FALSE(_ack_in_kernel))
00117     {
00118       unsigned irqnum = id().irq();
00119 
00120       Pic::enable(irqnum);
00121     }
00122 }
00123 
00124 
00125 
00126 inline Irq *Irq::lookup( unsigned irq )
00127 {
00128   return static_cast<Irq*>(Irq_alloc::lookup(irq));
00129 }
00130 
00131 #endif // irq_h

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