8 /* tsd_t holds all global vars which may change between threads as expected.*/
9 typedef struct _tsd_t
{
10 void * mem_tsd
; /* local variables of memory.c */
11 void * var_tsd
; /* local variables of variable.c */
12 void * stk_tsd
; /* local variables of stack.c */
13 void * fil_tsd
; /* local variables of files.c */
14 void * itp_tsd
; /* local variables of interprt.c */
15 void * tra_tsd
; /* local variables of tracing.c */
16 void * err_tsd
; /* local variables of error.c */
17 void * vms_tsd
; /* local variables of vmscmd.c */
18 void * bui_tsd
; /* local variables of builtin.c */
19 void * vmf_tsd
; /* local variables of vmsfuncs.c */
20 void * lib_tsd
; /* local variables of library.c */
21 void * rex_tsd
; /* local variables of rexxsaa.c */
22 void * shl_tsd
; /* local variables of shell.c */
23 void * mat_tsd
; /* local variables of strmath.c */
24 void * cli_tsd
; /* local variables of client.c */
25 void * ami_tsd
; /* local variables of amigafuncs.c */
26 void * arx_tsd
; /* local variables of arexxfuncs.c */
27 void * mt_tsd
; /* local variables of mt_???.c */
29 void * CH
; /* only rexxsaa.c */
30 int indentsize
; /* only in r2perl.c */
31 int loopcnt
; /* only in r2perl.c */
32 paramboxptr listleaked_params
; /* only in funcs.c */
33 paramboxptr par_stack
; /* only in funcs.c */
34 int traceparse
; /* only in parsing.c */
35 num_descr rdes
; /* only in expr.c */
36 num_descr ldes
; /* only in expr.c */
37 void * firstenvir
; /* only in envir.c */
38 void * last_alloca_header
; /* only in alloca.c */
39 void * stkaddr
; /* only in alloca.c */
40 volatile char * tmp_strs
[8]; /* only tmpstr_of() */
41 int next_tmp_str
; /* only tmpstr_of() */
42 paramboxptr bif_first
; /* only builtinfunc() */
43 void * firstmacro
; /* only in macros.c */
47 int listleakedmemory
;
53 unsigned long thread_id
;
54 int instore_is_errorfree
;
58 /* Stuff for a delayed exit()/setjmp(): */
60 jmp_buf protect_return
;
62 volatile delayed_error_type_t delayed_error_type
;
63 volatile int expected_exit_error
;
64 /* call exit() with this value if
65 * delayed_error_type is PROTECTED_DelayedScriptExit
67 volatile int HaltRaised
;
68 void * (*MTMalloc
)(const struct _tsd_t
*TSD
,size_t size
);
69 void (*MTFree
)(const struct _tsd_t
*TSD
,void *chunk
);
70 void (*MTExit
)(int code
);
74 struct _OS_Dep_funcs
*OS
;
77 #if (defined(POSIX) || defined(_POSIX_SOURCE) || defined(_PTHREAD_SEMANTICS)) && (defined(_REENTRANT) || defined(REENTRANT))
78 # include "mt_posix.h"
79 #elif defined(_WIN64) && defined(REGINA_SINGLE_THREADED)
80 # include "mt_notmt.h"
81 # define SINGLE_THREADED
82 #elif defined(_WIN64) && defined(_MT)
83 # include "mt_win32.h"
84 #elif defined(_WIN32) && defined(_MT)
85 # include "mt_win32.h"
86 #elif defined(OS2) && defined(__EMX__) && defined(__MT__) && defined(REGINA_MULTI)
88 #elif defined(OS2) && defined(__WATCOMC__) && defined(REGINA_MULTI)
90 #elif (defined(__AROS__) || defined(_AMIGA)) && defined(RXLIB)
91 # include "mt_amigalib.h"
93 # include "mt_notmt.h"
94 # if !defined(SINGLE_THREADED) && !defined(MULTI_THREADED)
95 # define SINGLE_THREADED
99 /* SINGLE_THREAD is defined explicitely, thus: */
100 #if !defined(SINGLE_THREADED) && !defined(MULTI_THREADED)
101 # define MULTI_THREADED
104 #endif /* MT_H_INCLUDED */