aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc/proc.h
diff options
context:
space:
mode:
authorMarvin Borner2020-08-22 19:44:49 +0200
committerMarvin Borner2020-08-22 19:44:49 +0200
commit8bb7b5cceaaf96a5dd6321d35aae28748896d87b (patch)
tree9a4103fb1da636fdf0c5ec8f04425c0c388f527d /kernel/inc/proc.h
parent424dc57424ee17de77d689443f95d2e1bed72f4a (diff)
Added *very* basic polling ipc
Diffstat (limited to 'kernel/inc/proc.h')
-rw-r--r--kernel/inc/proc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/inc/proc.h b/kernel/inc/proc.h
index 48bd7d7..e9d1612 100644
--- a/kernel/inc/proc.h
+++ b/kernel/inc/proc.h
@@ -7,6 +7,7 @@
#include <event.h>
#include <interrupts.h>
#include <list.h>
+#include <sys.h>
#define PROC_QUANTUM 42 // Milliseconds
@@ -25,6 +26,7 @@ struct proc {
struct regs regs_backup;
enum proc_state state;
struct list *events;
+ struct list *messages;
};
struct proc_event {
@@ -32,10 +34,19 @@ struct proc_event {
void *data;
};
+struct proc_message {
+ struct proc *src;
+ struct proc *dest;
+ struct message *msg;
+};
+
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);
struct proc *proc_make();