diff options
Diffstat (limited to 'src/kernel/arch/amd64/driver/util.h')
-rw-r--r-- | src/kernel/arch/amd64/driver/util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kernel/arch/amd64/driver/util.h b/src/kernel/arch/amd64/driver/util.h index d89992a..06ca672 100644 --- a/src/kernel/arch/amd64/driver/util.h +++ b/src/kernel/arch/amd64/driver/util.h @@ -1,4 +1,5 @@ #pragma once +#include <shared/container/ring.h> #include <stdbool.h> #include <stddef.h> @@ -14,3 +15,7 @@ int req_readcopy(struct vfs_request *req, const void *buf, size_t len); void postqueue_join(struct vfs_request **queue, struct vfs_request *req); bool postqueue_pop(struct vfs_request **queue, void (*accept)(struct vfs_request *)); + +/** If there are any pending read requests, and the ring buffer isn't empty, fulfill them + * all with a single read. */ +void postqueue_ringreadall(struct vfs_request **queue, ring_t *r); |