[391] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

pthread_detach

daemon@ATHENA.MIT.EDU (Till Bubeck)
Fri Aug 23 08:36:55 1996

To: pthreads@MIT.EDU
Cc: bubeck@peanuts.informatik.uni-tuebingen.de,
        hutteman@peanuts.informatik.uni-tuebingen.de
Date: Fri, 23 Aug 1996 14:05:00 +0200
From: Till Bubeck <bubeck@peanuts.informatik.uni-tuebingen.de>


Hi,

I have a general question about the POSIX standard of threads (POSIX 1003.1c). 
Maybe someone on this mailing list can help.

We are using a vendor pthreads package on a NEC-SX/4 which is called 
POSIX-conform. However we have to use a explicit pthread_detach(id), after we 
have made a pthread_join(id) in order to release all thread-specific 
resources. This detach must be done even on non-detached threads! Therefore a 
correct implementation on this machine would be:

       pthread_t joe;          /* holds pthread thread id */

	/* we create a "normal" thread, this means: not detached */
       pthread_create(&joe, NULL, fun, arg);
       pthread_join(joe, &arg);
	pthread_detach(joe);       <- this is necessary on NEC! conform?

Is this POSIX-conform or is it a violation of the standard?

Thanks in advance,
     Till
                ,,,
               (o o)
-----------oOO--(_)--OOo-------------------------------------------
|  Tilmann Bubeck            |   _||__                            |
|  Universitaet Tuebingen    |  /   . | <- Berlin                 |
|  Technische Informatik     |  |    _/                           |
|  Sand 13, 72076 Tuebingen  |  |_   \                            |
|  Germany                   |   /*__/ <- University of T"ubingen |
|------------------------------------------------------------------
|  Tel: +49 7071 2975865    Fax: +49 7071 610399                  |
|  Email: bubeck@peanuts.informatik.uni-tuebingen.de              |
|  WWW/Mosaic: http://www-ti.informatik.uni-tuebingen.de/~bubeck  |
-------------------------------------------------------------------


home help back first fref pref prev next nref lref last post