#ifdef PTHREAD_CREATE_DETACHED
} else {
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-#elif HAVE_PTHREAD_OS390
+#elif HAVE_PTHREADS_OS390
} else {
int st = __DETACHED;
pthread_attr_setdetachstate(&attr, &st);
#endif
rtn = pthread_create( thread, &attr, start_routine, arg );
-#ifdef HAVE_PTHREAD_OS390
+#ifdef HAVE_PTHREADS_OS390
if ( rtn == -1 ) rtn = errno;
#endif
#if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
if( detach ) {
+#ifdef HAVE_PTHREADS_OS390
+ (void) pthread_detach( thread );
+#else
(void) pthread_detach( *thread );
+#endif
}
#endif
pthread_attr_destroy(&attr);
if (thread_return==NULL)
thread_return=&dummy;
#endif
-#ifdef HAVE_PTHREAD_OS390
+#ifdef HAVE_PTHREADS_OS390
int st = pthread_join( thread, thread_return );
if ( st == -1 ) st = errno;
return st;
ldap_pvt_thread_kill( ldap_pvt_thread_t thread, int signo )
{
#ifdef HAVE_PTHREAD_KILL
-#ifdef HAVE_PTHREAD_OS390
+#ifdef HAVE_PTHREADS_OS390
int st = pthread_kill( thread, signo );
if ( st == -1 ) st = errno;
return st;
return sched_yield();
#elif HAVE_PTHREAD_YIELD
-#if HAVE_PTHREAD_OS390
+#if HAVE_PTHREADS_OS390
pthread_yield(NULL);
#else
pthread_yield();