summaryrefslogtreecommitdiff
path: root/src/kernel/proc.h
diff options
context:
space:
mode:
authordzwdz2024-07-25 22:17:27 +0200
committerdzwdz2024-07-25 22:17:27 +0200
commit69fd0dd9fda47aa52cccdbef6ca388cea38e693b (patch)
tree9e0e80e0380f2f39dea8f3a76ecb629918ff187a /src/kernel/proc.h
parent24934406d5d39e013e22a9e6f4138c4169460d71 (diff)
kernel: pass more information to user on interrupt
This is meant to facilitate a syscall for returning from interrupts, which will actually work in the general case as opposed to the current hack, which only works if the interrupt occured during a syscall (which is correct... for now).
Diffstat (limited to 'src/kernel/proc.h')
-rw-r--r--src/kernel/proc.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/kernel/proc.h b/src/kernel/proc.h
index 99eac94..96cd8ba 100644
--- a/src/kernel/proc.h
+++ b/src/kernel/proc.h
@@ -88,6 +88,7 @@ struct Proc {
/* interrupt handler */
void __user *intr_fn;
+ Intr *queuedintr;
struct {
void *buf;
@@ -99,6 +100,12 @@ struct Proc {
uint64_t basetime;
};
+/* an interrupt queued for delivery */
+struct Intr {
+ size_t len;
+ char buf[];
+};
+
extern Proc *proc_cur;
/** Creates the root process. */
@@ -116,9 +123,6 @@ void proc_kill(Proc *proc, int ret);
/** Tries to reap a dead process / free a tombstone. */
void proc_tryreap(Proc *dead);
-/** Try to interrupt whatever the process is doing instead of PS_RUNNING. */
-void proc_tryintr(Proc *p);
-
/** Send an interupt to a process. */
void proc_intr(Proc *p, const char *buf, size_t len);