summaryrefslogtreecommitdiff
path: root/src/user/app/drawmouse/drawmouse.c
diff options
context:
space:
mode:
authordzwdz2022-08-23 19:15:59 +0200
committerdzwdz2022-08-23 19:15:59 +0200
commit38cf66edaacc4e58b561bea8a77abfd3facf59fe (patch)
tree2e9ff33e195078fdcd454607082064e949b29bd4 /src/user/app/drawmouse/drawmouse.c
parent03c5dd9462492e291c6a49b88e1cd9ab34d86b6f (diff)
shared/ring: rename ring_size to ring_used, add ring_avail
Diffstat (limited to 'src/user/app/drawmouse/drawmouse.c')
-rw-r--r--src/user/app/drawmouse/drawmouse.c2
1 files changed, 1 insertions, 1 deletions
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;