*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> pthread_join (3p)              
Title
Content
Arch
Section
 

Contents


pthread_join(3P)					      pthread_join(3P)


NAME    [Toc]    [Back]

     pthread_join - wait for thread termination

C SYNOPSIS    [Toc]    [Back]

     #include <pthread.h>

     int pthread_join(pthread_t	thread,	void **retval);

DESCRIPTION    [Toc]    [Back]

     The pthread_join()	function waits for the thread identified by thread to
     terminate.	 If retval is not zero,	then it	will be	set to the exit	value
     of	the thread [see	pthread_exit(),	pthread_cancel()].  Only one thread
     may wait for another at one time.

     A detached	thread [see pthread_detach()] may not be joined.  A successful
     join will automatically detach the	target thread.	However,
     pthread_join() is a cancellation point and	if the joiner is cancelled,
     the target	thread remains undetached and can be the target	of another
     pthread_join().  If a thread becomes detached after another thread	is
     waiting for it, the waiting thread	is awoken and returns an error.

DIAGNOSTICS    [Toc]    [Back]

     On	success	pthread_join() returns zero; otherwise an error	number is
     returned:

     [ESRCH]	    The	thread parameter does not identify a thread.

     [EINVAL]	    The	thread identified by thread is not joinable (it	is
		    detached).

     [EDEADLK]	    The	thread identified by thread is the calling thread.

SEE ALSO    [Toc]    [Back]

      
      
     pthread_exit(3P), pthread_cancel(3P), pthread_detach(3P).


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
pthread_join Tru64 Causes the calling thread to wait for the termination of the specified thread
wait3 NetBSD wait for process termination
wait4 NetBSD wait for process termination
wait4 OpenBSD wait for process termination
wait NetBSD wait for process termination
waitpid NetBSD wait for process termination
waitpid FreeBSD wait for process termination
wait4 FreeBSD wait for process termination
wait3 FreeBSD wait for process termination
wait FreeBSD wait for process termination
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service