X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=mware%2Fevent.h;h=c81b3eabb095e92f4d305f94528306c7635fe841;hb=c49c99e64ee64ad490b2aea2d6c6d8f9f6d225db;hp=a0e8c75a049bb0a1d51ea62366c26e06149902d0;hpb=0d9c3da0e6cfef703a519f475c437af7a9cdd673;p=bertos.git diff --git a/mware/event.h b/mware/event.h index a0e8c75a..c81b3eab 100755 --- a/mware/event.h +++ b/mware/event.h @@ -18,6 +18,21 @@ /*#* *#* $Log$ + *#* Revision 1.7 2006/03/20 17:52:22 bernie + *#* Add missing forward declaration. + *#* + *#* Revision 1.6 2006/02/24 01:17:44 bernie + *#* Update for new emulator. + *#* + *#* Revision 1.5 2006/02/24 00:26:21 bernie + *#* Fix header name. + *#* + *#* Revision 1.4 2006/02/10 12:24:42 bernie + *#* Fix standalone build. + *#* + *#* Revision 1.3 2006/01/16 03:27:49 bernie + *#* Rename sig_t to sigbit_t to avoid clash with POSIX. + *#* *#* Revision 1.2 2005/11/27 03:02:55 bernie *#* Convert to appconfig.h. *#* @@ -62,13 +77,17 @@ #ifndef KERN_EVENT_H #define KERN_EVENT_H +#include #include #if CONFIG_KERNEL - #include + #include #if defined(CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS - #include "signal.h" + #include #endif + + /* Forward decl */ + struct Process; #endif @@ -84,7 +103,7 @@ typedef struct Event struct { struct Process *sig_proc; /* Process to be signalled */ - sig_t sig_bit; /* Signal to send */ + sigbit_t sig_bit; /* Signal to send */ } Sig; #endif struct @@ -117,7 +136,7 @@ INLINE Event event_createNone(void) ((e)->action = event_hook_softint,(e)->Ev.Int.func = (f), (e)->Ev.Int.user_data = (u)) /*! Same as event_initSoftInt(), but returns the initialized event */ -INLINE Event event_createSoftInt(Hook func, void* user_data) +INLINE Event event_createSoftInt(Hook func, void *user_data) { Event e; e.action = event_hook_softint; @@ -134,7 +153,7 @@ INLINE Event event_createSoftInt(Hook func, void* user_data) ((e)->action = event_hook_signal,(e)->Ev.Sig.sig_proc = (p), (e)->Ev.Sig.sig_bit = (s)) /*! Same as event_initSignal(), but returns the initialized event */ -INLINE Event event_createSignal(struct Process* proc, sig_t bit) +INLINE Event event_createSignal(struct Process *proc, sigbit_t bit) { Event e; e.action = event_hook_signal; @@ -146,7 +165,7 @@ INLINE Event event_createSignal(struct Process* proc, sig_t bit) #endif /*! Trigger an event */ -INLINE void event_do(struct Event* e) +INLINE void event_do(struct Event *e) { e->action(e); }