diff options
Diffstat (limited to 'src/kernel/vfs/request.h')
-rw-r--r-- | src/kernel/vfs/request.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/kernel/vfs/request.h b/src/kernel/vfs/request.h index 06c46e7..616c044 100644 --- a/src/kernel/vfs/request.h +++ b/src/kernel/vfs/request.h @@ -1,5 +1,6 @@ #pragma once #include <kernel/types.h> +#include <shared/ring.h> #include <stdbool.h> #include <stddef.h> @@ -77,3 +78,14 @@ void vfsback_userdown(VfsBackend *); /** Decrements the "provider" reference count. */ void vfsback_provdown(VfsBackend *); + +struct ReqQueue { + VfsReq *head; +}; +void postqueue_init(ReqQueue *q); +void postqueue_join(ReqQueue *q, VfsReq *req); +VfsReq *postqueue_pop(ReqQueue *q); + +/** If there are any pending read requests, and the ring buffer isn't empty, fulfill them + * all with a single read. */ +void postqueue_ringreadall(ReqQueue *q, ring_t *r); |