aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/event.h9
-rw-r--r--kernel/inc/proc.h9
2 files changed, 6 insertions, 12 deletions
diff --git a/kernel/inc/event.h b/kernel/inc/event.h
index 0a42f97..89c3e56 100644
--- a/kernel/inc/event.h
+++ b/kernel/inc/event.h
@@ -8,13 +8,12 @@
#include <sys.h>
struct event_descriptor {
- enum event id;
- u32 *func;
+ enum message_type id;
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, void *data);
+u32 event_register(enum message_type id, struct proc *proc);
+void event_unregister(enum message_type id, struct proc *proc);
+u32 event_trigger(enum message_type id, void *data);
#endif
diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h
index 186c18e..36d8e85 100644
--- a/kernel/inc/proc.h
+++ b/kernel/inc/proc.h
@@ -25,27 +25,22 @@ struct proc {
struct regs regs;
struct regs regs_backup;
enum proc_state state;
- struct list *events;
struct list *messages;
};
-struct proc_event {
- struct event_descriptor *desc;
- void *data;
-};
-
struct proc_message {
struct proc *src;
struct proc *dest;
struct message *msg;
};
+struct proc *kernel_proc;
+
void proc_init();
void proc_print();
struct proc *proc_current();
void proc_send(struct proc *src, struct proc *dest, enum message_type type, void *data);
struct proc_message *proc_receive(struct proc *proc);
-void proc_resolve(struct proc *proc);
struct proc *proc_from_pid(u32 pid);
void proc_exit(struct proc *proc, int status);
void proc_yield();