aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2020-08-22 13:20:40 +0200
committerMarvin Borner2020-08-22 13:20:40 +0200
commit00a64ff4675b4c1e22d6b4856e1f6b7c04ed96d8 (patch)
treee4f2e6df5750fc6b7334c35ee3d8554cd4b303ce /kernel/inc
parent593c80e99342df5e1147b3c0fc893f77ec6f00d5 (diff)
Added proc event list
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/event.h3
-rw-r--r--kernel/inc/proc.h9
2 files changed, 10 insertions, 2 deletions
diff --git a/kernel/inc/event.h b/kernel/inc/event.h
index d14fdb0..0a42f97 100644
--- a/kernel/inc/event.h
+++ b/kernel/inc/event.h
@@ -8,12 +8,13 @@
#include <sys.h>
struct event_descriptor {
+ enum event id;
u32 *func;
struct proc *proc;
};
u32 event_map(enum event id, struct proc *proc, u32 *func);
void event_unmap(enum event id, struct proc *proc, u32 *func);
-u32 event_trigger(enum event id, u32 *data);
+u32 event_trigger(enum event id, void *data);
#endif
diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h
index 8f93e43..7e13652 100644
--- a/kernel/inc/proc.h
+++ b/kernel/inc/proc.h
@@ -4,7 +4,9 @@
#define PROC_H
#include <def.h>
+#include <event.h>
#include <interrupts.h>
+#include <list.h>
#define PROC_QUANTUM 42 // Milliseconds
@@ -18,7 +20,12 @@ struct proc {
u32 pid;
char name[32];
struct regs regs;
- u32 event;
+ struct list *events;
+};
+
+struct proc_event {
+ struct event_descriptor *desc;
+ void *data;
};
void proc_init();