diff options
author | dzwdz | 2024-07-11 21:43:50 +0200 |
---|---|---|
committer | dzwdz | 2024-07-11 21:43:50 +0200 |
commit | ed8ff1ff9c4c0f847ffc2ab4624bd999539a0890 (patch) | |
tree | 7dd5ad530f65fb09f6f0ce6c4d94efa2fc2d05d7 /src/kernel/arch | |
parent | 8138ba97608ff0cd4e443994390f277eca3d7b28 (diff) |
kernel: start cleaning up VfsRequest
* I'm being more strict about the linked list state to hopefully ensure
I'm not leaking any references.
* vfsreq_create was renamed to vfsreq_dispatchcopy as that name feels more
clear. It copies its argument, and dispatches it.
* Requests for user backends are now handled more like requests for kernel
backends - there's an accept() function that accepts a request.
Diffstat (limited to 'src/kernel/arch')
-rw-r--r-- | src/kernel/arch/amd64/driver/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kernel/arch/amd64/driver/util.c b/src/kernel/arch/amd64/driver/util.c index 0f0ee34..2b33849 100644 --- a/src/kernel/arch/amd64/driver/util.c +++ b/src/kernel/arch/amd64/driver/util.c @@ -26,6 +26,7 @@ bool postqueue_pop(VfsReq **queue, void (*accept)(VfsReq *)) { VfsReq *req = *queue; if (req == NULL) return false; *queue = req->postqueue_next; + req->postqueue_next = NULL; accept(req); return true; } @@ -45,6 +46,7 @@ void postqueue_ringreadall(VfsReq **queue, ring_t *r) { while (*queue) { req = *queue; *queue = req->postqueue_next; + req->postqueue_next = NULL; size_t ret = min(mlen, req->output.len); assert(req->type == VFSOP_READ); |