diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-16 13:08:33 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-16 13:08:33 +0000 |
commit | 5cbe9849aa1763616f25576b46308a1cbe474252 (patch) | |
tree | 974369b90ab76cc277f1d063c58bf3639fef5bed /ext | |
parent | 8e9464f100f3a92c77a6886c84855b4d1f587e2d (diff) | |
download | perl-5cbe9849aa1763616f25576b46308a1cbe474252.tar.gz |
Move the stack desire definition to thread.h.
p4raw-id: //depot/perl@10122
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Thread/Thread.xs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs index c3b94eb6a8..b81ee26d9c 100644 --- a/ext/Thread/Thread.xs +++ b/ext/Thread/Thread.xs @@ -279,14 +279,19 @@ newthread (pTHX_ SV *startsv, AV *initargs, char *classname) if (!attr_inited) { attr_inited = 1; err = pthread_attr_init(&attr); +# ifdef THREAD_CREATE_NEEDS_STACK + if (err == 0) + err = pthread_attr_setstacksize(&attr, THREAD_CREATE_NEEDS_STACK); + if (err) + croak("panic: pthread_attr_setstacksize failed"); +#else + croak("panic: can't pthread_attr_setstacksize"); +# endif # ifdef PTHREAD_ATTR_SETDETACHSTATE -#ifdef DGUX - if (err == 0) - err = pthread_attr_setstacksize(&attr, (1024*16)); -#endif if (err == 0) err = PTHREAD_ATTR_SETDETACHSTATE(&attr, attr_joinable); - + if (err) + croak("panic: pthread_attr_setdetachstate failed"); # else croak("panic: can't pthread_attr_setdetachstate"); # endif |