lib: c: add pthread implementation

This commit is contained in:
2026-03-18 21:08:49 +00:00
parent 342b588b38
commit cf70352caa
13 changed files with 309 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#include "pthread.h"
#include <errno.h>
#include <mango/handle.h>
#include <mango/object.h>
#include <mango/signal.h>
#include <mango/task.h>
#include <pthread.h>
#include <sys/mman.h>
int pthread_detach(struct __pthread *thread)
{
thread->thr_flags |= THREAD_DETACHED;
kern_handle_close(thread->thr_handle);
return 0;
}