X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=thread.h;h=e9933e225ef0531d5442e8b23986499a4b3c4940;hb=3087ffe5392074af110039a182a495009358a8e1;hp=a82c01b61d07d625e519297cea73a07658300829;hpb=de992003099f76a2f2b1df9b7f937a2338296e9a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/thread.h b/thread.h index a82c01b..e9933e2 100644 --- a/thread.h +++ b/thread.h @@ -1,4 +1,13 @@ -#if defined(USE_THREADS) || defined(USE_ITHREADS) +/* thread.h + * + * Copyright (c) 1997-2002, Larry Wall + * + * You may distribute under the terms of either the GNU General Public + * License or the Artistic License, as specified in the README file. + * + */ + +#if defined(USE_5005THREADS) || defined(USE_ITHREADS) #if defined(VMS) #include @@ -78,7 +87,7 @@ #endif #ifdef DGUX -# define THREAD_CREATE_NEEDS_STACK (16*1024) +# define THREAD_CREATE_NEEDS_STACK (32*1024) #endif #ifdef I_MACH_CTHREADS @@ -302,21 +311,13 @@ } STMT_END #endif -void Perl_atfork_lock(void); -void Perl_atfork_unlock(void); - #ifndef PTHREAD_ATFORK # ifdef HAS_PTHREAD_ATFORK # define PTHREAD_ATFORK(prepare,parent,child) \ pthread_atfork(prepare,parent,child) # else -# ifdef HAS_FORK -# define PTHREAD_ATFORK(prepare,parent,child) \ - Perl_croak(aTHX_ "No pthread_atfork() -- fork() too unsafe"); -# else -# define PTHREAD_ATFORK(prepare,parent,child) \ - NOOP -# endif +# define PTHREAD_ATFORK(prepare,parent,child) \ + NOOP # endif #endif @@ -325,7 +326,7 @@ void Perl_atfork_unlock(void); # define THREAD_RET_CAST(p) ((void *)(p)) #endif /* THREAD_RET */ -#if defined(USE_THREADS) +#if defined(USE_5005THREADS) /* Accessor for per-thread SVs */ # define THREADSV(i) (thr->threadsvp[i]) @@ -379,8 +380,8 @@ typedef struct condpair { #define MgCONDP(mg) (&((condpair_t *)(mg->mg_ptr))->cond) #define MgOWNER(mg) ((condpair_t *)(mg->mg_ptr))->owner -#endif /* USE_THREADS */ -#endif /* USE_THREADS || USE_ITHREADS */ +#endif /* USE_5005THREADS */ +#endif /* USE_5005THREADS || USE_ITHREADS */ #ifndef MUTEX_LOCK # define MUTEX_LOCK(m) @@ -474,7 +475,3 @@ typedef struct condpair { #ifndef INIT_THREADS # define INIT_THREADS NOOP #endif - -#ifndef PTHREAD_ATFORK -# define PTHREAD_ATFORK(prepare,parent,child) NOOP -#endif