From ca1c74751a9625679b5609358df83cb2912e76c4 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Tue, 24 Nov 1998 20:47:17 +0000 Subject: [PATCH] Bugfix: Set the TEBF_WIN32 flag in teb.flags for 32-bit threads. --- include/thread.h | 4 ++++ scheduler/thread.c | 1 + 2 files changed, 5 insertions(+) diff --git a/include/thread.h b/include/thread.h index 60c4220441..7a6d85b514 100644 --- a/include/thread.h +++ b/include/thread.h @@ -53,6 +53,10 @@ typedef struct _TEB struct _PDB32 *process; /* 30 owning process (used by NT3.51 applets)*/ } TEB; +/* Thread exception flags */ +#define TEBF_WIN32 0x0001 +#define TEBF_TRAP 0x0002 + /* Event waiting structure */ typedef struct { diff --git a/scheduler/thread.c b/scheduler/thread.c index 7639c3ef4b..91eb1837ee 100644 --- a/scheduler/thread.c +++ b/scheduler/thread.c @@ -182,6 +182,7 @@ THDB *THREAD_Create( PDB32 *pdb, DWORD stack_size, BOOL32 alloc_stack16, thdb->teb.except = (void *)-1; thdb->teb.htask16 = 0; /* FIXME */ thdb->teb.self = &thdb->teb; + thdb->teb.flags = (pdb->flags & PDB32_WIN16_PROC)? 0 : TEBF_WIN32; thdb->teb.tls_ptr = thdb->tls_array; thdb->teb.process = pdb; thdb->wait_list = &thdb->wait_struct; -- 2.32.0.93.g670b81a890