+__DEFINE_LXSYSCALL3(
+ int, sigprocmask, int, how, const sigset_t, *set, sigset_t, *oldset)
+{
+ // TODO maybe it is a good opportunity to introduce a process-wide
+ // signal mask?
+
+ if (signal_set_sigmask(current_thread, how, oldset, set)) {
+ return 0;
+ }
+
+ syscall_result(EINVAL);
+ return -1;
+}
+
+__DEFINE_LXSYSCALL3(
+ int, th_sigmask, int, how, const sigset_t, *set, sigset_t, *oldset)
+{
+ if (signal_set_sigmask(current_thread, how, oldset, set)) {
+ return 0;
+ }
+
+ return EINVAL;
+}
+
+__DEFINE_LXSYSCALL2(int, sys_sigaction, int, signum, struct sigaction*, action)