2026-03-18 21:08:49 +00:00
|
|
|
#ifndef _THREAD_PTHREAD_H_
|
|
|
|
|
#define _THREAD_PTHREAD_H_
|
|
|
|
|
|
|
|
|
|
#include <mango/types.h>
|
|
|
|
|
|
|
|
|
|
enum pthread_flags {
|
|
|
|
|
THREAD_DETACHED = 0x01u,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct __pthread {
|
|
|
|
|
struct __pthread *thr_self;
|
|
|
|
|
enum pthread_flags thr_flags;
|
|
|
|
|
kern_handle_t thr_handle;
|
|
|
|
|
void *thr_map_base;
|
|
|
|
|
size_t thr_map_size;
|
|
|
|
|
void *thr_result;
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-22 19:08:42 +00:00
|
|
|
extern struct __pthread *__pthread_self(void);
|
2026-03-18 21:08:49 +00:00
|
|
|
extern void __pthread_unmap_exit(
|
|
|
|
|
kern_handle_t address_space,
|
|
|
|
|
void *unmap_base,
|
|
|
|
|
size_t unmap_length);
|
|
|
|
|
|
|
|
|
|
#endif
|