summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-05-16 13:08:33 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-16 13:08:33 +0000
commit5cbe9849aa1763616f25576b46308a1cbe474252 (patch)
tree974369b90ab76cc277f1d063c58bf3639fef5bed /ext
parent8e9464f100f3a92c77a6886c84855b4d1f587e2d (diff)
downloadperl-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.xs15
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