Skip to content
Snippets Groups Projects
Commit a1a04f27 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Make pthread test detect broke pthread join/detach behavior

parent fd41a199
No related branches found
No related tags found
No related merge requests found
......@@ -619,18 +619,22 @@ AC_DEFUN([OL_PTHREAD_TEST_FUNCTION],[
status = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
if( status ) exit( status );
#define ATTR &attr
# define ATTR &attr
#elif defined( HAVE_PTHREADS_D4 )
# define ATTR pthread_attr_default
#else
#if HAVE_PTHREADS_D4
#define ATTR pthread_attr_default
#else
#define ATTR NULL
#endif
# define ATTR NULL
#endif
/* make sure pthread_create() isn't just a stub */
status = pthread_create(&t, ATTR, task, NULL);
if( status ) exit( status );
/* give the thread a chance to complete...
* it should remain joinable and hence detachable
*/
sleep( 1 );
/* make sure pthread_detach() isn't just a stub */
#if HAVE_PTHREADS_D4
status = pthread_detach( &t );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment