lib: c: add pthread implementation
This commit is contained in:
17
lib/libc/pthread/thread/pthread_detach.c
Normal file
17
lib/libc/pthread/thread/pthread_detach.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user