# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Wed May 7 23:33:48 EET DST 2003 [metaconfig 3.0 PL70]
+# Generated on Sat May 24 10:07:39 EET DST 2003 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
d_old_pthread_create_joinable=''
old_pthread_create_joinable=''
d_pthread_atfork=''
+d_pthread_attr_setscope=''
d_pthread_yield=''
d_sched_yield=''
sched_yield=''
set d_pthread_atfork
eval $setvar
+: see if pthread_attr_setscope exists
+set pthread_attr_setscope d_pthread_attr_setscope
+eval $inlibc
+
: see whether the various POSIXish _yields exist
$cat >try.c <<EOP
d_portable='$d_portable'
d_procselfexe='$d_procselfexe'
d_pthread_atfork='$d_pthread_atfork'
+d_pthread_attr_setscope='$d_pthread_attr_setscope'
d_pthread_yield='$d_pthread_yield'
d_pwage='$d_pwage'
d_pwchange='$d_pwchange'
#define PROCSELFEXE_PATH $procselfexe /**/
#endif
+/* HAS_PTHREAD_ATTR_SETSCOPE:
+ * This symbol, if defined, indicates that the pthread_attr_setscope
+ * system call is available to set the contention scope attribute of
+ * a thread attribute object.
+ */
+#$d_pthread_attr_setscope HAS_PTHREAD_ATTR_SETSCOPE /**/
+
/* HAS_READV:
* This symbol, if defined, indicates that the readv routine is
* available to do gather reads. You will also need <sys/uio.h>
#ifdef OLD_PTHREADS_API
pthread_create( &thread->thr, attr, Perl_ithread_run, (void *)thread);
#else
-# ifdef PTHREAD_SCOPE_SYSTEM
+# if defined(HAS_PTHREAD_ATTR_SETSCOPE) && defined(PTHREAD_SCOPE_SYSTEM)
pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM );
# endif
pthread_create( &thread->thr, &attr, Perl_ithread_run, (void *)thread);