From 38cf66edaacc4e58b561bea8a77abfd3facf59fe Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 23 Aug 2022 19:15:59 +0200 Subject: shared/ring: rename ring_size to ring_used, add ring_avail --- src/user/app/drawmouse/drawmouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/user/app/drawmouse/drawmouse.c') diff --git a/src/user/app/drawmouse/drawmouse.c b/src/user/app/drawmouse/drawmouse.c index 7e7c55b..47e8e8a 100644 --- a/src/user/app/drawmouse/drawmouse.c +++ b/src/user/app/drawmouse/drawmouse.c @@ -66,7 +66,7 @@ int main(void) { int len = _syscall_read(fd, buf, sizeof buf, 0); if (len == 0) break; ring_put(&r, buf, len); - while (ring_size(&r) >= 3) { + while (ring_used(&r) >= 3) { struct packet p; ring_get(&r, &p, sizeof p); p.dy *= -1; -- cgit v1.2.3