Kernel/LibC: Implement sigwait

This commit is contained in:
2025-08-20 20:16:19 +03:00
parent 247743ef9c
commit def236b7cd
4 changed files with 45 additions and 0 deletions

View File

@@ -91,6 +91,7 @@ __BEGIN_DECLS
O(SYS_SIGPENDING, sigpending) \
O(SYS_SIGPROCMASK, sigprocmask) \
O(SYS_SIGSUSPEND, sigsuspend) \
O(SYS_SIGWAIT, sigwait) \
O(SYS_SETITIMER, setitimer) \
O(SYS_POSIX_OPENPT, posix_openpt) \
O(SYS_PTSNAME, ptsname) \

View File

@@ -169,3 +169,10 @@ int sigsuspend(const sigset_t* sigmask)
{
return syscall(SYS_SIGSUSPEND, sigmask);
}
int sigwait(const sigset_t* __restrict set, int* __restrict sig)
{
if (syscall(SYS_SIGWAIT, set, sig) == -1)
return errno;
return 0;
}