Integrate from ansi branch to mainline.
Malcolm Beattie [Tue, 25 Nov 1997 15:42:07 +0000 (15:42 +0000)]
p4raw-id: //depot/perl@296

1  2 
global.sym
op.c
perl.c
perl.h
sv.h
util.c
win32/win32thread.c
win32/win32thread.h

diff --cc global.sym
Simple merge
diff --cc op.c
Simple merge
diff --cc perl.c
Simple merge
diff --cc perl.h
Simple merge
diff --cc sv.h
Simple merge
diff --cc util.c
Simple merge
Simple merge
@@@ -105,10 -105,24 +105,23 @@@ typedef HANDLE perl_mutex
  
  typedef THREAD_RET_TYPE thread_func_t(void *);
  
  START_EXTERN_C
+ #if defined(PERLDLL) && (!defined(__BORLANDC__) || defined(_DLL))
+ extern __declspec(thread) struct thread *Perl_current_thread;
+ #define SET_THR(t)            (Perl_current_thread = t)
+ #define THR                   Perl_current_thread
+ #else
+ #define THR                   Perl_getTHR()
+ #define SET_THR(t)            Perl_setTHR(t)
+ #endif
  void Perl_alloc_thread_key _((void));
 -int Perl_thread_create _((struct thread *thr, thread_func_t *fn));
 -void Perl_set_thread_self _((struct thread *thr));
 -struct thread *Perl_getTHR _((void));
 -void Perl_setTHR _((struct thread *t));
 -
 +int Perl_thread_create _((struct perl_thread *thr, thread_func_t *fn));
 +void Perl_set_thread_self _((struct perl_thread *thr));
++struct perl_thread *Perl_getTHR _((void));
++void Perl_setTHR _((struct perl_thread *t));
  END_EXTERN_C
  
  #define INIT_THREADS NOOP