summaryrefslogtreecommitdiff
path: root/LibC/unistd.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-29 15:17:20 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-29 15:17:20 +0200
commitd07be1087a61f892f6b80b9378942397e5de5bb2 (patch)
tree00ea81a15fde18907e16354f658e1b29d1ef6156 /LibC/unistd.cpp
parent02b69cf06a0b5c47d592fc5f947ad536dc3b5050 (diff)
downloadserenity-d07be1087a61f892f6b80b9378942397e5de5bb2.zip
Kernel+LibC: Add exit_thread() syscall.
Diffstat (limited to 'LibC/unistd.cpp')
-rw-r--r--LibC/unistd.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/LibC/unistd.cpp b/LibC/unistd.cpp
index 41051bb53b..e551f479a6 100644
--- a/LibC/unistd.cpp
+++ b/LibC/unistd.cpp
@@ -451,6 +451,12 @@ int create_thread(int(*entry)(void*), void* argument)
__RETURN_WITH_ERRNO(rc, rc, -1);
}
+int exit_thread(int code)
+{
+ int rc = syscall(SC_exit_thread, code);
+ __RETURN_WITH_ERRNO(rc, rc, -1);
+}
+
int ftruncate(int fd, off_t length)
{
int rc = syscall(SC_ftruncate, fd, length);