LibC/Kernel: Add support for detached pthreads
This commit is contained in:
@@ -214,6 +214,7 @@ namespace Kernel
|
||||
BAN::ErrorOr<long> sys_pthread_join(pthread_t thread, void** value);
|
||||
BAN::ErrorOr<long> sys_pthread_self();
|
||||
BAN::ErrorOr<long> sys_pthread_kill(pthread_t thread, int signal);
|
||||
BAN::ErrorOr<long> sys_pthread_detach(pthread_t thread);
|
||||
|
||||
BAN::ErrorOr<long> sys_clock_gettime(clockid_t, timespec*);
|
||||
|
||||
|
||||
@@ -117,6 +117,9 @@ namespace Kernel
|
||||
const Process& process() const;
|
||||
bool has_process() const { return m_process; }
|
||||
|
||||
void detach() { m_is_detached = true; }
|
||||
bool is_detached() const { return m_is_detached; }
|
||||
|
||||
bool is_userspace() const { return m_is_userspace; }
|
||||
|
||||
uint64_t cpu_time_ns() const;
|
||||
@@ -176,6 +179,7 @@ namespace Kernel
|
||||
State m_state { State::NotStarted };
|
||||
Process* m_process { nullptr };
|
||||
bool m_is_userspace { false };
|
||||
BAN::Atomic<bool> m_is_detached { false };
|
||||
bool m_delete_process { false };
|
||||
|
||||
vaddr_t m_fsbase { 0 };
|
||||
|
||||
Reference in New Issue
Block a user