X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=thread.h;h=4744aa0bdd1d145e544002900f4d8f68a09c4b79;hb=21efee590d868d225431dc4d2515c810203e38e3;hp=99269a1f1f0b609ea6ae8deb00320c3767eccf7a;hpb=5cbe9849aa1763616f25576b46308a1cbe474252;p=p5sagit%2Fp5-mst-13.2.git diff --git a/thread.h b/thread.h index 99269a1..4744aa0 100644 --- a/thread.h +++ b/thread.h @@ -249,8 +249,22 @@ } STMT_END #endif /* JOIN */ +/* Use an unchecked fetch of thread-specific data instead of a checked one. + * It would fail if the key were bogus, but if the key were bogus then + * Really Bad Things would be happening anyway. --dan */ +#if (defined(__ALPHA) && (__VMS_VER >= 70000000)) || \ + (defined(__alpha) && defined(__osf__)) /* Available only on >= 4.0 */ +# define HAS_PTHREAD_UNCHECKED_GETSPECIFIC_NP /* Configure test needed */ +#endif + +#ifdef HAS_PTHREAD_UNCHECKED_GETSPECIFIC_NP +# define PTHREAD_GETSPECIFIC(key) pthread_unchecked_getspecific_np(key) +#else +# define PTHREAD_GETSPECIFIC(key) pthread_getspecific(key) +#endif + #ifndef PERL_GET_CONTEXT -# define PERL_GET_CONTEXT pthread_getspecific(PL_thr_key) +# define PERL_GET_CONTEXT PTHREAD_GETSPECIFIC(PL_thr_key) #endif #ifndef PERL_SET_CONTEXT