thread_join(2)
DESCRIPTION
Waits for a thread and collects its result.
SYNOPSIS
long thread_join(uint32_t tid, void *result);
RETURN VALUE
- Returns a non-negative result on success. Negative values are ABI errno codes.
ERRORS
-EFAULT- The result pointer is not writable userspace memory.
-EINVAL- The thread is detached, already joined, or is the caller.
-ESRCH- The thread does not exist.
ABI
Arguments enter through the direct syscall ABI; validation is performed before entering the process subsystem.