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
213cee62
Commit
213cee62
authored
Mar 22, 2006
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Mar 23, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: Load QueueUserWorkItem function dynamically.
parent
6ad46cc9
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 @
213cee62
...
...
@@ -58,6 +58,9 @@ static GetThreadPriorityBoost_t pGetThreadPriorityBoost=NULL;
typedef
HANDLE
(
WINAPI
*
OpenThread_t
)(
DWORD
,
BOOL
,
DWORD
);
static
OpenThread_t
pOpenThread
=
NULL
;
typedef
BOOL
(
WINAPI
*
QueueUserWorkItem_t
)(
LPTHREAD_START_ROUTINE
,
PVOID
,
ULONG
);
static
QueueUserWorkItem_t
pQueueUserWorkItem
=
NULL
;
typedef
DWORD
(
WINAPI
*
SetThreadIdealProcessor_t
)(
HANDLE
,
DWORD
);
static
SetThreadIdealProcessor_t
pSetThreadIdealProcessor
=
NULL
;
...
...
@@ -695,13 +698,16 @@ static void test_QueueUserWorkItem(void)
DWORD
wait_result
;
DWORD
before
,
after
;
/* QueueUserWorkItem not present on win9x */
if
(
!
pQueueUserWorkItem
)
return
;
finish_event
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
before
=
GetTickCount
();
for
(
i
=
0
;
i
<
100
;
i
++
)
{
BOOL
ret
=
QueueUserWorkItem
(
work_function
,
(
void
*
)
i
,
WT_EXECUTEDEFAULT
);
BOOL
ret
=
p
QueueUserWorkItem
(
work_function
,
(
void
*
)
i
,
WT_EXECUTEDEFAULT
);
ok
(
ret
,
"QueueUserWorkItem failed with error %ld
\n
"
,
GetLastError
());
}
...
...
@@ -724,6 +730,7 @@ START_TEST(thread)
ok
(
lib
!=
NULL
,
"Couldn't get a handle for kernel32.dll
\n
"
);
pGetThreadPriorityBoost
=
(
GetThreadPriorityBoost_t
)
GetProcAddress
(
lib
,
"GetThreadPriorityBoost"
);
pOpenThread
=
(
OpenThread_t
)
GetProcAddress
(
lib
,
"OpenThread"
);
pQueueUserWorkItem
=
(
QueueUserWorkItem_t
)
GetProcAddress
(
lib
,
"QueueUserWorkItem"
);
pSetThreadIdealProcessor
=
(
SetThreadIdealProcessor_t
)
GetProcAddress
(
lib
,
"SetThreadIdealProcessor"
);
pSetThreadPriorityBoost
=
(
SetThreadPriorityBoost_t
)
GetProcAddress
(
lib
,
"SetThreadPriorityBoost"
);
test_CreateThread_basic
();
...
...
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