aboutsummaryrefslogtreecommitdiff
path: root/lib/mlibc/sysdeps/keyronex/generic/signal.cpp
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-07 17:28:52 -0500
committerIan Moffett <ian@osmora.org>2024-03-07 18:24:51 -0500
commitf5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 (patch)
tree93b156621dc0303816b37f60ba88051b702d92f6 /lib/mlibc/sysdeps/keyronex/generic/signal.cpp
parentbd5969fc876a10b18613302db7087ef3c40f18e1 (diff)
build: Build mlibc + add distclean target
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/sysdeps/keyronex/generic/signal.cpp')
-rw-r--r--lib/mlibc/sysdeps/keyronex/generic/signal.cpp66
1 files changed, 0 insertions, 66 deletions
diff --git a/lib/mlibc/sysdeps/keyronex/generic/signal.cpp b/lib/mlibc/sysdeps/keyronex/generic/signal.cpp
deleted file mode 100644
index ead3dee..0000000
--- a/lib/mlibc/sysdeps/keyronex/generic/signal.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-#include <sys/types.h>
-
-#include <keyronex/syscall.h>
-#include <mlibc/ansi-sysdeps.hpp>
-#include <mlibc/posix-sysdeps.hpp>
-#include <mlibc/debug.hpp>
-
-namespace mlibc {
-
-int
-sys_sigprocmask(int how, const sigset_t *__restrict set,
- sigset_t *__restrict retrieve)
-{
- auto ret = syscall3(kPXSysSigMask, how, (uintptr_t)set,
- (uintptr_t)retrieve, NULL);
- if (int e = sc_error(ret); e) {
- return e;
- }
-
- return 0;
-}
-
-int
-sys_sigaction(int signal, const struct sigaction *__restrict action,
- struct sigaction *__restrict oldAction)
-{
- auto ret = syscall3(kPXSysSigAction, signal, (uintptr_t)action,
- (uintptr_t)oldAction, NULL);
- if (int e = sc_error(ret); e) {
- return e;
- }
-
- return 0;
-}
-
-int
-sys_kill(int pid, int signal)
-{
- if (signal == 0) {
- mlibc::infoLogger() << "Sending signal 0! Allowing" << frg::endlog;
- return 0;
- }
-
- auto ret = syscall2(kPXSysSigSend, pid, signal, NULL);
- if (int e = sc_error(ret); e) {
- return e;
- }
-
- return 0;
-}
-
-int
-sys_sigsuspend(const sigset_t *set)
-{
- auto ret = syscall1(kPXSysSigSuspend, (uintptr_t)set, NULL);
- if (int e = sc_error(ret); e) {
- return e;
- }
-
- mlibc::panicLogger()
- << "Unexpected zero return from sigsuspend()" << frg::endlog;
-
- return 0;
-}
-
-} \ No newline at end of file