RTEMS Logo

RTEMS 4.10.2 On-Line Library


Thread Manager pthread_join - Wait for Thread Termination

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

17.4.20: pthread_join - Wait for Thread Termination

CALLING SEQUENCE:

#include <pthread.h>

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

STATUS CODES:

ESRCH
The thread specified is invalid.
EINVAL
The thread specified is not a joinable thread.
EDEADLK
A deadlock was detected or thread is the calling thread.

DESCRIPTION:

The pthread_join routine suspends execution of the calling thread until thread terminates. If thread has already terminated, then this routine returns immediately. The value returned by thread (i.e. passed to pthread_exit is returned in value_ptr.

When this routine returns, then thread has been terminated.

NOTES:

The results of multiple simultaneous joins on the same thread is undefined.

If any threads have previously joined with the specified thread, then they will remain joined with that thread. Any subsequent calls to pthread_join on the specified thread will fail.

If value_ptr is NULL, then no value is returned.


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2008 OAR Corporation