summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/kernel/proc.c8
-rw-r--r--src/kernel/proc.h6
-rw-r--r--src/kernel/vfs/request.c2
-rw-r--r--src/kernel/vfs/root.c4
4 files changed, 3 insertions, 17 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index c9e3aef..ee26f44 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -213,9 +213,6 @@ void process_transition(struct process *p, enum process_state state) {
case PS_WAITS4REQUEST:
assert(last == PS_RUNNING);
break;
- case PS_WAITS4IRQ:
- assert(last == PS_WAITS4FS);
- break;
case PS_LAST:
panic_invalid_state();
@@ -267,9 +264,8 @@ void process_kill(struct process *p, int ret) {
case PS_WAITS4FS:
// if the request wasn't accepted we could just remove this process from the queue
- case PS_WAITS4IRQ:
- req = p->state == PS_WAITS4FS
- ? p->waits4fs.req : p->waits4irq.req;
+ // eh
+ req = p->waits4fs.req;
req->caller = NULL;
// TODO test this
break;
diff --git a/src/kernel/proc.h b/src/kernel/proc.h
index a6a8609..f9786b9 100644
--- a/src/kernel/proc.h
+++ b/src/kernel/proc.h
@@ -15,7 +15,6 @@ enum process_state {
PS_WAITS4CHILDDEATH,
PS_WAITS4FS,
PS_WAITS4REQUEST,
- PS_WAITS4IRQ, // set by root vfs
PS_LAST,
};
@@ -44,11 +43,6 @@ struct process {
size_t max_len;
struct fs_wait_response __user *res;
} awaited_req; // PS_WAITS4REQUEST
- struct {
- struct vfs_request *req;
- bool (*ready)();
- void (*callback)(struct process *);
- } waits4irq;
};
struct vfs_request *handled_req;
diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c
index 5ad3b82..f463b86 100644
--- a/src/kernel/vfs/request.c
+++ b/src/kernel/vfs/request.c
@@ -56,7 +56,7 @@ int vfsreq_finish(struct vfs_request *req, int ret) {
kfree(req->input.buf_kern);
if (req->caller) {
- assert(req->caller->state == PS_WAITS4FS || req->caller->state == PS_WAITS4IRQ);
+ assert(req->caller->state == PS_WAITS4FS);
regs_savereturn(&req->caller->regs, ret);
process_transition(req->caller, PS_RUNNING);
}
diff --git a/src/kernel/vfs/root.c b/src/kernel/vfs/root.c
index c1b16fa..c7bd717 100644
--- a/src/kernel/vfs/root.c
+++ b/src/kernel/vfs/root.c
@@ -45,10 +45,6 @@ static void req_preprocess(struct vfs_request *req, size_t max_len) {
}
-static void wait_callback(struct process *proc) {
- vfs_root_accept(proc->waits4irq.req);
-}
-
static int handle(struct vfs_request *req, bool *ready) {
assert(req->caller);
switch (req->type) {