summaryrefslogtreecommitdiff
path: root/src/user/tests/semaphore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/tests/semaphore.c')
-rw-r--r--src/user/tests/semaphore.c8
1 files changed, 4 insertions, 4 deletions
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;