#ifndef __interrupt_h__ #define __interrupt_h__ #include "type.h" #include "list.h" struct IntLock { U32 key; inline lock() { register U32 _key; asm volatile(" pushf"); asm volatile(" pop %0": "=a"(_key) : ); asm volatile(" and %0,0x0200": "=a"(_key) : "a"(_key) ); asm volatile(" cli"); key=_key; } inline unlock() { register U32 _key; _key=key; asm volatile(" and %0,0x0200": "=a"(_key) :"a"(_key) ); asm volatile(" je 1"); asm volatile(" sti"); } }; template struct IntConnected: public Node > { typedef void (Type::*Methode)(); Methode methode; inline void call() { (this->*methode)(); } /* //void (Type::*methode)(); Type *object; */ }; #endif /* __interrupt_h__ */