c_inp_stream and friends are thread private!
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
#define Yap_c_input_stream WL->c_input_stream
|
||||
#define Yap_c_output_stream WL->c_output_stream
|
||||
#define Yap_c_error_stream WL->c_error_stream
|
||||
|
||||
#define OldASP WL->rinfo.old_ASP
|
||||
#define OldLCL0 WL->rinfo.old_LCL0
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
|
||||
typedef struct worker_local {
|
||||
|
||||
int c_input_stream;
|
||||
int c_output_stream;
|
||||
int c_error_stream;
|
||||
|
||||
restoreinfo rinfo;
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
|
||||
static void InitWorker(int wid) {
|
||||
|
||||
FOREIGN_WL(wid)->c_input_stream = 0;
|
||||
FOREIGN_WL(wid)->c_output_stream = 1;
|
||||
FOREIGN_WL(wid)->c_error_stream = 2;
|
||||
|
||||
FOREIGN_WL(wid)->rinfo.old_ASP = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_LCL0 = NULL;
|
||||
FOREIGN_WL(wid)->rinfo.old_TR = NULL;
|
||||
|
||||
@@ -54,6 +54,10 @@ static void RestoreWorker(int wid) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -322,11 +322,6 @@ Term STD_PROTO(Yap_WStringToList,(wchar_t *));
|
||||
Term STD_PROTO(Yap_WStringToListOfAtoms,(wchar_t *));
|
||||
Atom STD_PROTO(Yap_LookupWideAtom,(wchar_t *));
|
||||
|
||||
extern int
|
||||
Yap_c_input_stream,
|
||||
Yap_c_output_stream,
|
||||
Yap_c_error_stream;
|
||||
|
||||
#define YAP_INPUT_STREAM 0x01
|
||||
#define YAP_OUTPUT_STREAM 0x02
|
||||
#define YAP_APPEND_STREAM 0x04
|
||||
|
||||
Reference in New Issue
Block a user