syscalls: fix for os-test

This commit is contained in:
Matheus
2025-12-08 22:48:49 -03:00
parent 227fcb5386
commit 57e4a39f53
13 changed files with 73 additions and 19 deletions
+8 -3
View File
@@ -15,9 +15,14 @@ syscallret_t syscall_waitpid(context_t *context, pid_t pid, int *status, int opt
.ret = -1
};
__assert((options & ~KNOWN_FLAGS) == 0);
// TODO implement these
__assert(pid == -1 || pid > 0);
if (options & ~KNOWN_FLAGS)
printf("waitpid: unknown %x\n", options);
if (pid < -1 || pid == 0) {
printf("waitpid: unhandled pid %d\n", pid);
ret.errno = EOPNOTSUPP;
return ret;
}
thread_t *thread = current_thread();
proc_t *proc = thread->proc;