syscalls: killthread

This commit is contained in:
Matheus
2024-09-09 18:03:49 -03:00
parent a432610644
commit 85cbdc05c1
4 changed files with 76 additions and 8 deletions
+10 -4
View File
@@ -221,10 +221,10 @@ index 0000000..e5b087a
+
diff --git mlibc-workdir/sysdeps/astral/generic/generic.cpp mlibc-workdir/sysdeps/astral/generic/generic.cpp
new file mode 100644
index 0000000..1ce2424
index 0000000..b73c420
--- /dev/null
+++ mlibc-workdir/sysdeps/astral/generic/generic.cpp
@@ -0,0 +1,1002 @@
@@ -0,0 +1,1007 @@
+#include <bits/ensure.h>
+#include <mlibc/debug.hpp>
+#include <mlibc/all-sysdeps.hpp>
@@ -299,6 +299,11 @@ index 0000000..1ce2424
+ return 0;
+ }
+
+ int sys_tgkill(int pid, int tid, int sig) {
+ long ret;
+ return syscall(SYSCALL_KILLTHREAD, &ret, pid, tid, sig);
+ }
+
+ int sys_sigpending(sigset_t *set) {
+ long ret;
+ return syscall(SYSCALL_SIGPENDING, &ret, (uint64_t)set);
@@ -1246,10 +1251,10 @@ index 0000000..990eca0
+#endif
diff --git mlibc-workdir/sysdeps/astral/include/astral/syscall.h mlibc-workdir/sysdeps/astral/include/astral/syscall.h
new file mode 100644
index 0000000..058d486
index 0000000..4d603e8
--- /dev/null
+++ mlibc-workdir/sysdeps/astral/include/astral/syscall.h
@@ -0,0 +1,114 @@
@@ -0,0 +1,115 @@
+#ifndef _SYSCALL_H_INCLUDE
+#define _SYSCALL_H_INCLUDE
+
@@ -1344,6 +1349,7 @@ index 0000000..058d486
+#define SYSCALL_SIGSUSPEND 88
+#define SYSCALL_SIGTIMEDWAIT 89
+#define SYSCALL_SIGPENDING 90
+#define SYSCALL_KILLTHREAD 91
+
+#include <stddef.h>
+#include <stdint.h>