aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2020-08-17 14:15:58 +0200
committerMarvin Borner2020-08-17 14:15:58 +0200
commitccbf380a850babc01ad2dfd4dcfca9ae44447161 (patch)
treef1eacdbc1e8fe5322f49e1fa419a9f985bb0f778 /kernel/inc
parentca7d400b7705ba887df69391cb774d4de83e8bf3 (diff)
Added event descriptor
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/event.h6
-rw-r--r--kernel/inc/proc.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/kernel/inc/event.h b/kernel/inc/event.h
index e40b345..d0fe4fc 100644
--- a/kernel/inc/event.h
+++ b/kernel/inc/event.h
@@ -4,8 +4,14 @@
#define EVENT_H
#include <def.h>
+#include <proc.h>
#include <sys.h>
+struct event_descriptor {
+ u32 *func;
+ struct proc *proc;
+};
+
u32 event_map(enum event id, u32 *func);
void event_unmap(enum event id, u32 *func);
u32 event_trigger(enum event id, u32 *data);
diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h
index 9f3816d..1ed5df2 100644
--- a/kernel/inc/proc.h
+++ b/kernel/inc/proc.h
@@ -19,12 +19,13 @@ struct proc {
enum state state;
char name[32];
struct regs regs;
- /* struct proc *parent; */
struct proc *next;
+ u32 event;
};
void proc_init();
void proc_print();
+struct proc *proc_current();
void proc_exit();
struct proc *proc_make();