summaryrefslogtreecommitdiff
path: root/ext/Thread
diff options
context:
space:
mode:
authorBrad Hughes <brad@tgsmc.com>1998-07-15 02:38:12 -0700
committerGurusamy Sarathy <gsar@cpan.org>1998-07-21 02:44:25 +0000
commit9ef4b0a6c6b34d8ffe957e3ad7b4df9d711296af (patch)
tree91b320bf15a7fa76555f743c55d19a76009f80e6 /ext/Thread
parent439f571593d0ebba38c10df345300e8ba4061bf1 (diff)
downloadperl-9ef4b0a6c6b34d8ffe957e3ad7b4df9d711296af.tar.gz
VMS patches from Dan Sugalski <sugalskd@osshe.edu>
Date: Wed, 15 Jul 1998 09:38:12 -0700 Message-Id: <3.0.5.32.19980715093812.00a42a50@ous.edu> Subject: [PATCH 5.005-beta1]Quick VMS config update -- Date: Wed, 15 Jul 1998 12:53:52 -0700 Message-Id: <3.0.5.32.19980715125352.00a25cb0@ous.edu> Subject: Re: $ebcdic has broken VMS in _75 (Now with doc patch!) -- Date: Thu, 16 Jul 1998 11:15:44 -0700 Message-Id: <3.0.5.32.19980716111544.00b78770@ous.edu> Subject: [PATCH 5.004_75]Another VMS tweak for the Vax C compiler -- Date: Thu, 16 Jul 1998 11:21:55 -0700 Message-Id: <3.0.5.32.19980716112155.00a66c50@ous.edu> Subject: [PATCH 5.004_75]Get archname correct for thread build on VMS -- Date: Thu, 16 Jul 1998 11:25:04 -0700 Message-Id: <3.0.5.32.19980716112504.00ae0d50@ous.edu> Subject: [PATCH 5.004_75]Thread build tweaks for VMS 6.2 and older -- Date: Fri, 17 Jul 1998 15:29:13 -0700 Message-Id: <3.0.5.32.19980717152913.00a469b0@ous.edu> Subject: [PATCH 5.004_75]Missed a header file in VMS build procedure -- Date: Mon, 20 Jul 1998 10:20:49 -0700 Message-Id: <3.0.5.32.19980720102049.00a05100@ous.edu> Subject: [PATCH 5.004_75]Tweaks to Thread.XS for OLD_PTHREADS_API build -- Date: Mon, 20 Jul 1998 10:13:03 -0700 Message-Id: <3.0.5.32.19980720101303.00a17100@ous.edu> Subject: [PATCH 5.004_75]Explicitly specify extensions during VMS config process -- Date: Mon, 20 Jul 1998 15:51:22 -0700 Message-Id: <3.0.5.32.19980720155122.00a41950@ous.edu> Subject: patch for readme.vms p4raw-id: //depot/perl@1589
Diffstat (limited to 'ext/Thread')
-rw-r--r--ext/Thread/Thread.xs17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs
index 9bf52855ef..665956577d 100644
--- a/ext/Thread/Thread.xs
+++ b/ext/Thread/Thread.xs
@@ -256,12 +256,29 @@ newthread (SV *startsv, AV *initargs, char *classname)
err = 0;
if (!attr_inited) {
attr_inited = 1;
+#ifdef OLD_PTHREADS_API
+ err = pthread_attr_create(&attr);
+#else
err = pthread_attr_init(&attr);
+#endif
+#ifdef OLD_PTHREADS_API
+#ifdef VMS
+/* This is available with the old pthreads API, but only with */
+/* DecThreads (VMS and Digital Unix) */
+ if (err == 0)
+ err = pthread_attr_setdetach_np(&attr, ATTR_JOINABLE);
+#endif
+#else
if (err == 0)
err = pthread_attr_setdetachstate(&attr, ATTR_JOINABLE);
+#endif
}
if (err == 0)
+#ifdef OLD_PTHREADS_API
+ err = pthread_create(&thr->self, attr, threadstart, (void*) thr);
+#else
err = pthread_create(&thr->self, &attr, threadstart, (void*) thr);
+#endif
/* Go */
MUTEX_UNLOCK(&thr->mutex);
#endif