Causes the calling thread to wait for the termination of a specified thread.
cma_thread_join( thread, exit_status, result);
Argument Data Type Accessthread opaque cma_t_thread read exit_status opaque cma_t_exit_ write status result pointer write
#includevoid cma_thread_join ( cma_t_thread *thread, cma_t_exit_status *exit_status, cma_t_address *result);
Value Descriptioncma_c_term_normal Normal termination cma_c_term_error Error termination (result of calling cma_thread_exit_error() ) cma_c_term_alert Alert termination
The value returned as the exit_status argument indicates whether the thread terminated normally, because of an error, or because of an alert.
The value returned as the result argument is the address that the specified thread generates as its result. The thread's result is normally returned as the value of the start_ routine argument in its call to cma_thread_create. In order for the result argument to be valid, the following must occur:
Any number of threads can call this routine. All threads are awakened when the specified thread terminates. If the thread is already terminated, this routine returns immediately.
If the current thread calls this routine, a deadlock results if it is detected by the implementation.
The results of this routine are unpredictable if the value for thread refers to cma_c_null or a thread that has been detached.
This routine is alertable.
cma_e_alerted cma_e_existence cma_e_use_error