mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:47:35 +00:00
Kernel+LibC: Implement sigtimedwait()
This includes a new Thread::Blocker called SignalBlocker which blocks until a signal of a matching type is pending. The current Blocker implementation in the Kernel is very complicated, but cleaning it up is a different yak for a different day.
This commit is contained in:
parent
13d98999b7
commit
762e047ec9
8 changed files with 120 additions and 0 deletions
|
@ -163,6 +163,12 @@ int sigsuspend(const sigset_t* set)
|
|||
return pselect(0, nullptr, nullptr, nullptr, nullptr, set);
|
||||
}
|
||||
|
||||
int sigtimedwait(sigset_t const* set, siginfo_t* info, struct timespec const* timeout)
|
||||
{
|
||||
int rc = syscall(Syscall::SC_sigtimedwait, set, info, timeout);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
const char* sys_signame[] = {
|
||||
"INVAL",
|
||||
"HUP",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue