Kernel/LibC: Implement pthread_join

This commit is contained in:
2025-04-02 12:50:56 +03:00
parent e85b18e206
commit be786be67d
4 changed files with 63 additions and 2 deletions

View File

@@ -93,6 +93,7 @@ __BEGIN_DECLS
O(SYS_YIELD, yield) \
O(SYS_PTHREAD_CREATE, pthread_create) \
O(SYS_PTHREAD_EXIT, pthread_exit) \
O(SYS_PTHREAD_JOIN, pthread_join) \
O(SYS_PTHREAD_SELF, pthread_self) \
enum Syscall

View File

@@ -55,6 +55,11 @@ void pthread_exit(void* value_ptr)
ASSERT_NOT_REACHED();
}
int pthread_join(pthread_t thread, void** value_ptr)
{
return syscall(SYS_PTHREAD_JOIN, thread, value_ptr);
}
pthread_t pthread_self(void)
{
return syscall(SYS_PTHREAD_SELF);