Kernel/LibC: Implement pthread_self

This commit is contained in:
2025-04-02 02:39:14 +03:00
parent 691c9fe8e0
commit 5549696c3a
4 changed files with 12 additions and 0 deletions

View File

@@ -92,6 +92,7 @@ __BEGIN_DECLS
O(SYS_HARDLINKAT, hardlinkat) \
O(SYS_PTHREAD_CREATE, pthread_create) \
O(SYS_PTHREAD_EXIT, pthread_exit) \
O(SYS_PTHREAD_SELF, pthread_self) \
enum Syscall
{

View File

@@ -47,3 +47,8 @@ void pthread_exit(void* value_ptr)
syscall(SYS_PTHREAD_EXIT, value_ptr);
ASSERT_NOT_REACHED();
}
pthread_t pthread_self(void)
{
return syscall(SYS_PTHREAD_SELF);
}