From: Jarkko Hietaniemi Date: Sat, 24 May 2003 05:57:49 +0000 (+0000) Subject: Add a real scan for pthread_attr_setscope(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=58d975c3f477b5042b8ebb54dfefbe22116c9794;p=p5sagit%2Fp5-mst-13.2.git Add a real scan for pthread_attr_setscope(). p4raw-id: //depot/perl@19604 --- diff --git a/Configure b/Configure index 201dedb..8e2a765 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $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$$ <try.c <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #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 diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index a03ec3c..6ef046f 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -506,7 +506,7 @@ Perl_ithread_create(pTHX_ SV *obj, char* classname, SV* init_function, SV* param #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);