From 93af95b3419edfc127c6ea4245753540190c520e Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 11 Jul 2022 22:21:57 +0200 Subject: user: add shorthand close() and fork() wrappers for those syscalls --- src/user/tests/semaphore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/user/tests/semaphore.c') diff --git a/src/user/tests/semaphore.c b/src/user/tests/semaphore.c index e5aacaa..836edf5 100644 --- a/src/user/tests/semaphore.c +++ b/src/user/tests/semaphore.c @@ -37,11 +37,11 @@ void test_semaphore(void) { handle_t pipe[2]; assert(_syscall_pipe(pipe, 0) >= 0); - if (!_syscall_fork(0, NULL)) { + if (!fork()) { sem1 = esem_new(0); sem2 = esem_new(0); assert(sem1 && sem2); - if (!_syscall_fork(0, NULL)) { + if (!fork()) { odd(pipe[1], sem1, sem2); _syscall_exit(69); } else { @@ -56,7 +56,7 @@ void test_semaphore(void) { sem1 = esem_new(0); sem2 = esem_new(0); assert(sem1 && sem2); - if (!_syscall_fork(0, NULL)) { + if (!fork()) { even(pipe[1], sem1, sem2); _syscall_exit(69); } else { @@ -69,7 +69,7 @@ void test_semaphore(void) { _syscall_exit(0); } else { - _syscall_close(pipe[1]); + close(pipe[1]); char buf[16]; size_t pos = 0; -- cgit v1.2.3