pthread_join — create a thread #include <rtl_sched.h> int pthread_join(pthread_t thread, void **arg); This function is an RTLinux version of standard POSIX threads function. pthread_join suspends the calling thread until the target thread terminates. If arg is not NULL, the return value of the target thread will be (*arg) on return. If the target thread is terminated already, pthread_join returns immediately. On a non‐failure return, the target thread is guaranteed to be terminated already. There is, of course, no upper bound on how long this call may take. pthread_join returns 0 on success and a non‐zero error code on error. [EINVAL] The target is not a joinable thread. [ESRCH] No such thread. [EDADLK] The target thread is the calling thread. POSIX also uses this for when the OS detects other deadlocks, but RTLinux does not try to detect deadlock. Just write good code.. Victor Yodaiken (firstname.lastname@example.org (link to URL mailto:email@example.com) ) pthread_join is not all that useful at this time. Buttenhof’s book on thread programming essentially suggests that you never use it. In future plans, we hope to use it for fault tolerance support. UNIX spec pthread_join(3) (link to URL ../susv2/xsh/pthread_join.html) , pthread_make_periodic_np(3) (link to URL pthread_make_periodic_np.3.html) ©2001 FSMLabs Inc. All rights reserved.