diff options
author | dzwdz | 2022-08-23 19:15:59 +0200 |
---|---|---|
committer | dzwdz | 2022-08-23 19:15:59 +0200 |
commit | 38cf66edaacc4e58b561bea8a77abfd3facf59fe (patch) | |
tree | 2e9ff33e195078fdcd454607082064e949b29bd4 /src/kernel/arch | |
parent | 03c5dd9462492e291c6a49b88e1cd9ab34d86b6f (diff) |
shared/ring: rename ring_size to ring_used, add ring_avail
Diffstat (limited to 'src/kernel/arch')
-rw-r--r-- | src/kernel/arch/amd64/driver/ps2.c | 2 | ||||
-rw-r--r-- | src/kernel/arch/amd64/driver/serial.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/arch/amd64/driver/ps2.c b/src/kernel/arch/amd64/driver/ps2.c index 35165d9..9148c98 100644 --- a/src/kernel/arch/amd64/driver/ps2.c +++ b/src/kernel/arch/amd64/driver/ps2.c @@ -91,7 +91,7 @@ enum { }; static void read_backlog(struct vfs_request *req, ring_t *r, struct vfs_request **queue) { - if (ring_size(r) == 0) { + if (ring_used(r) == 0) { /* nothing to read, join queue */ assert(!req->postqueue_next); while (*queue) queue = &(*queue)->postqueue_next; diff --git a/src/kernel/arch/amd64/driver/serial.c b/src/kernel/arch/amd64/driver/serial.c index b3bfe29..cf21b61 100644 --- a/src/kernel/arch/amd64/driver/serial.c +++ b/src/kernel/arch/amd64/driver/serial.c @@ -72,7 +72,7 @@ static void accept(struct vfs_request *req) { vfsreq_finish_short(req, valid ? 0 : -1); break; case VFSOP_READ: - if (ring_size((void*)&backlog) == 0) { + if (ring_used((void*)&backlog) == 0) { /* nothing to read, join queue */ assert(!req->postqueue_next); struct vfs_request **slot = &blocked_on; |