This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Initial (untested) merge of all non-ansi changes on ansiperl branch
[perl5.git] / thread.h
index 305155c..f18b38b 100644 (file)
--- a/thread.h
+++ b/thread.h
@@ -1,8 +1,8 @@
 #ifdef USE_THREADS
 
 #ifdef WIN32
-#  include "win32/win32thread.h"
-#endif
+#  include <win32thread.h>
+#else
 
 /* POSIXish threads */
 typedef pthread_t perl_thread;
@@ -23,6 +23,7 @@ typedef pthread_t perl_thread;
 #  define pthread_condattr_default NULL
 #  define pthread_attr_default NULL
 #endif /* OLD_PTHREADS_API */
+#endif
 
 #ifndef YIELD
 #  define YIELD sched_yield()
@@ -127,6 +128,7 @@ struct thread *getTHR _((void));
 #  endif
 #endif
 
+
 #ifndef THREAD_RET_TYPE
 #  define THREAD_RET_TYPE      void *
 #  define THREAD_RET_CAST(p)   ((void *)(p))
@@ -222,7 +224,7 @@ struct thread {
     perl_mutex mutex;                  /* For the fields others can change */
     U32                tid;
     struct thread *next, *prev;                /* Circular linked list of threads */
-
+    JMPENV     Tstart_env;             /* Top of top_env longjmp() chain */ 
 #ifdef ADD_THREAD_INTERN
     struct thread_intern i;            /* Platform-dependent internals */
 #endif
@@ -305,6 +307,7 @@ typedef struct condpair {
 #undef chopset
 #undef formtarget
 #undef bodytarget
+#undef  start_env
 #undef toptarget
 #undef top_env
 #undef runlevel
@@ -380,6 +383,7 @@ typedef struct condpair {
 
 #define        top_env         (thr->Ttop_env)
 #define        runlevel        (thr->Trunlevel)
+#define start_env       (thr->Tstart_env)
 
 #else
 /* USE_THREADS is not defined */