Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e968628e
Commit
e968628e
authored
Nov 18, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid setting the context before the thread has started running, it's
broken on most Windows versions.
parent
c868b451
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
thread.c
dlls/kernel/tests/thread.c
+8
-1
No files found.
dlls/kernel/tests/thread.c
View file @
e968628e
...
...
@@ -610,6 +610,7 @@ static VOID test_GetThreadExitCode(void)
#ifdef __i386__
static
int
test_value
=
0
;
static
HANDLE
event
;
static
void
WINAPI
set_test_val
(
int
val
)
{
...
...
@@ -618,6 +619,8 @@ static void WINAPI set_test_val( int val )
static
DWORD
WINAPI
threadFunc6
(
LPVOID
p
)
{
SetEvent
(
event
);
Sleep
(
1000
);
test_value
*=
(
int
)
p
;
return
0
;
}
...
...
@@ -631,13 +634,17 @@ static void test_SetThreadContext(void)
DWORD
prevcount
;
SetLastError
(
0xdeadbeef
);
thread
=
CreateThread
(
NULL
,
0
,
threadFunc6
,
(
void
*
)
2
,
CREATE_SUSPENDED
,
&
threadid
);
event
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
thread
=
CreateThread
(
NULL
,
0
,
threadFunc6
,
(
void
*
)
2
,
0
,
&
threadid
);
ok
(
thread
!=
NULL
,
"CreateThread failed : (%ld)
\n
"
,
GetLastError
()
);
if
(
!
thread
)
{
trace
(
"Thread creation failed, skipping rest of test
\n
"
);
return
;
}
WaitForSingleObject
(
event
,
INFINITE
);
SuspendThread
(
thread
);
CloseHandle
(
event
);
ctx
.
ContextFlags
=
CONTEXT_FULL
;
SetLastError
(
0xdeadbeef
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment