From fe6fbfa07aa8326926049cf62560d940bc7305c0 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 27 Jul 2024 19:59:37 +0200 Subject: kernel: don't use pointer types for registers, add proc_savereturn --- src/kernel/pipe.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/kernel/pipe.c') diff --git a/src/kernel/pipe.c b/src/kernel/pipe.c index b7f5ad3..5efafc8 100644 --- a/src/kernel/pipe.c +++ b/src/kernel/pipe.c @@ -9,7 +9,7 @@ void pipe_joinqueue(Handle *h, Proc *proc, void __user *pbuf, size_t pbuflen) { assert(h && h->type == HANDLE_PIPE); assert(h->readable ^ h->writeable); if (!h->pipe.sister) { - regs_savereturn(&proc->regs, h->readable ? 0 : -EPIPE); + proc_savereturn(proc, h->readable ? 0 : -EPIPE); return; } @@ -54,8 +54,8 @@ static void pipe_trytransfer(Handle *h) { h->pipe.sister->pipe.queued = h->pipe.sister->pipe.queued->waits4pipe.next; proc_setstate(rdr, PS_RUNNING); proc_setstate(wtr, PS_RUNNING); - regs_savereturn(&rdr->regs, len); - regs_savereturn(&wtr->regs, len); + proc_savereturn(rdr, len); + proc_savereturn(wtr, len); } void pipe_invalidate_end(Handle *h) { @@ -63,7 +63,7 @@ void pipe_invalidate_end(Handle *h) { while (p) { assert(p->state == PS_WAITS4PIPE); proc_setstate(p, PS_RUNNING); - regs_savereturn(&p->regs, -1); + proc_savereturn(p, -1); p = p->waits4pipe.next; } h->pipe.queued = NULL; -- cgit v1.2.3