From deea8c83a3b778b8b9b49ebbad1810f59da3ccba Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 16 Sep 2012 12:07:23 +0800 Subject: [PATCH] Kernel - Added user events --- KernelLand/Kernel/include/events.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/KernelLand/Kernel/include/events.h b/KernelLand/Kernel/include/events.h index 57709405..dc9d6543 100644 --- a/KernelLand/Kernel/include/events.h +++ b/KernelLand/Kernel/include/events.h @@ -10,12 +10,30 @@ #include +/** + * \name Event Values + * \{ + */ +//! Fired when a VFS wait is ready [used in select(2)] #define THREAD_EVENT_VFS 0x00000001 +//! Fired when an IPC Message arrives #define THREAD_EVENT_IPCMSG 0x00000002 +//! Fired when a signal (e.g. SIGINT) is asserted #define THREAD_EVENT_SIGNAL 0x00000004 +//! Timer event fire #define THREAD_EVENT_TIMER 0x00000008 +//! General purpose event for short waits +//! e.g. waiting for an IRQ in a Read() call #define THREAD_EVENT_SHORTWAIT 0x00000010 +#define THREAD_EVENT_USER1 0x10000000 +#define THREAD_EVENT_USER2 0x20000000 +#define THREAD_EVENT_USER3 0x40000000 +#define THREAD_EVENT_USER4 0x80000000 +/** + * \} + */ + // === FUNCTIONS === extern void Threads_PostEvent(tThread *Thread, Uint32 EventMask); extern void Threads_ClearEvent(Uint32 EventMask); -- 2.20.1