#ifndef __Event_h #define __Event_h #ifdef __GNUG__ #pragma interface #endif /* FIXME: we hope to make IRQ's derive from Event */ class Event { class EventPoll *list; public: int handler(); Event() { list = 0; } void add(class EventPoll *); void del(class EventPoll *); }; class EventPoll { friend Event; EventPoll *next; Event *head; protected: EventPoll() { head = 0; } EventPoll(Event *e) { head = 0; arm(e); } virtual int eventHandler() = 0; void arm(Event *); void disarm(); virtual ~EventPoll() { disarm(); } public: static Event IdleEvent; }; #endif