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
f91b3ae3
Commit
f91b3ae3
authored
Oct 28, 2005
by
Saulius Krasuckas
Committed by
Alexandre Julliard
Oct 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test CreateThread() for reception of NULL pointer to TID.
parent
d5990208
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
thread.c
dlls/kernel/tests/thread.c
+19
-0
No files found.
dlls/kernel/tests/thread.c
View file @
f91b3ae3
...
...
@@ -178,6 +178,8 @@ static VOID test_CreateThread_basic(void)
t1Struct
tstruct
[
NUM_THREADS
];
int
error
;
DWORD
i
,
j
;
DWORD
GLE
,
ret
;
/* Retrieve current Thread ID for later comparisons */
curthreadId
=
GetCurrentThreadId
();
/* Allocate some local storage */
...
...
@@ -228,6 +230,23 @@ static VOID test_CreateThread_basic(void)
ok
(
CloseHandle
(
thread
[
i
])
!=
0
,
"CloseHandle failed
\n
"
);
}
ok
(
TlsFree
(
tlsIndex
)
!=
0
,
"TlsFree failed
\n
"
);
/* Test how passing NULL as a pointer to threadid works */
SetLastError
(
0xFACEaBAD
);
thread
[
0
]
=
CreateThread
(
NULL
,
0
,
threadFunc2
,
NULL
,
0
,
NULL
);
GLE
=
GetLastError
();
if
(
thread
[
0
])
{
/* NT */
ok
(
GLE
==
0xFACEaBAD
,
"CreateThread set last error to %ld, expected 4207848365"
,
GLE
);
ret
=
WaitForSingleObject
(
thread
[
0
],
100
);
ok
(
ret
==
WAIT_OBJECT_0
,
"threadFunc2 did not exit during 100 ms
\n
"
);
ret
=
GetExitCodeThread
(
thread
[
0
],
&
exitCode
);
ok
(
ret
!=
0
,
"GetExitCodeThread returned %ld (expected nonzero)
\n
"
,
ret
);
ok
(
exitCode
==
99
,
"threadFunc2 exited with code: %ld (expected 99)
\n
"
,
exitCode
);
ok
(
CloseHandle
(
thread
[
0
])
!=
0
,
"Error closing thread handle
\n
"
);
}
else
{
/* 9x */
ok
(
GLE
==
ERROR_INVALID_PARAMETER
,
"CreateThread set last error to %ld, expected 87"
,
GLE
);
}
}
/* Check that using the CREATE_SUSPENDED flag works */
...
...
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