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
eadd27a3
Commit
eadd27a3
authored
Jul 03, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Jul 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Forward remaining threadpool functions to ntdll.
parent
56b9af11
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
8 deletions
+53
-8
kernel32.spec
dlls/kernel32/kernel32.spec
+5
-5
thread.c
dlls/kernel32/tests/thread.c
+3
-3
thread.c
dlls/kernel32/thread.c
+40
-0
winternl.h
include/winternl.h
+5
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
eadd27a3
...
...
@@ -228,7 +228,7 @@
# @ stub ClosePrivateNamespace
@ stdcall CloseProfileUserMapping()
@ stub CloseSystemHandle
# @ stub CloseThreadp
ool
@ stdcall CloseThreadpool(ptr) ntdll.TpReleaseP
ool
@ stdcall CloseThreadpoolCleanupGroup(ptr) ntdll.TpReleaseCleanupGroup
@ stdcall CloseThreadpoolCleanupGroupMembers(ptr long ptr) ntdll.TpReleaseCleanupGroupMembers
# @ stub CloseThreadpoolIo
...
...
@@ -331,7 +331,7 @@
@ stdcall CreateSymbolicLinkW(wstr wstr long)
@ stdcall CreateTapePartition(long long long long)
@ stdcall CreateThread(ptr long ptr long long ptr)
# @ stub CreateThreadpool
@ stdcall CreateThreadpool(ptr)
@ stdcall CreateThreadpoolCleanupGroup()
# @ stub CreateThreadpoolIo
@ stdcall CreateThreadpoolTimer(ptr ptr ptr)
...
...
@@ -1454,8 +1454,8 @@
# @ stub SetThreadToken
@ stdcall SetThreadUILanguage(long)
# @ stub SetThreadpoolStackInformation
# @ stub SetThreadpoolThreadMaximum
# @ stub SetThreadpoolThreadMinimum
@ stdcall SetThreadpoolThreadMaximum(ptr long) ntdll.TpSetPoolMaxThreads
@ stdcall SetThreadpoolThreadMinimum(ptr long) ntdll.TpSetPoolMinThreads
@ stdcall SetThreadpoolTimer(ptr ptr long long)
# @ stub SetThreadpoolWait
@ stdcall SetTimeZoneInformation(ptr)
...
...
@@ -1509,7 +1509,7 @@
@ stdcall TryAcquireSRWLockExclusive(ptr) ntdll.RtlTryAcquireSRWLockExclusive
@ stdcall TryAcquireSRWLockShared(ptr) ntdll.RtlTryAcquireSRWLockShared
@ stdcall TryEnterCriticalSection(ptr) ntdll.RtlTryEnterCriticalSection
# @ stub TrySubmitThreadpoolCallback
@ stdcall TrySubmitThreadpoolCallback(ptr ptr ptr)
@ stdcall TzSpecificLocalTimeToSystemTime(ptr ptr ptr)
# @ stub TzSpecificLocalTimeToSystemTimeEx
# @ stub -arch=x86_64 uaw_lstrcmpW
...
...
dlls/kernel32/tests/thread.c
View file @
eadd27a3
...
...
@@ -1627,8 +1627,8 @@ static void test_threadpool(void)
int
workcalled
=
0
;
if
(
!
pCreateThreadpool
)
{
todo_wine
win_skip
(
"thread pool apis not supported.
\n
"
);
return
;
win_skip
(
"thread pool apis not supported.
\n
"
);
return
;
}
work
=
pCreateThreadpoolWork
(
threadpool_workcallback
,
&
workcalled
,
NULL
);
...
...
@@ -1640,7 +1640,7 @@ static void test_threadpool(void)
ok
(
workcalled
==
1
,
"expected work to be called once, got %d
\n
"
,
workcalled
);
pool
=
pCreateThreadpool
(
NULL
);
todo_wine
ok
(
pool
!=
NULL
,
"CreateThreadpool failed
\n
"
);
ok
(
pool
!=
NULL
,
"CreateThreadpool failed
\n
"
);
}
static
void
test_reserved_tls
(
void
)
...
...
dlls/kernel32/thread.c
View file @
eadd27a3
...
...
@@ -881,6 +881,26 @@ BOOL WINAPI CallbackMayRunLong( TP_CALLBACK_INSTANCE *instance )
}
/***********************************************************************
* CreateThreadpool (KERNEL32.@)
*/
PTP_POOL
WINAPI
CreateThreadpool
(
PVOID
reserved
)
{
TP_POOL
*
pool
;
NTSTATUS
status
;
TRACE
(
"%p
\n
"
,
reserved
);
status
=
TpAllocPool
(
&
pool
,
reserved
);
if
(
status
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
NULL
;
}
return
pool
;
}
/***********************************************************************
* CreateThreadpoolCleanupGroup (KERNEL32.@)
*/
PTP_CLEANUP_GROUP
WINAPI
CreateThreadpoolCleanupGroup
(
void
)
...
...
@@ -960,3 +980,23 @@ VOID WINAPI SetThreadpoolTimer( TP_TIMER *timer, FILETIME *due_time,
TpSetTimer
(
timer
,
due_time
?
&
timeout
:
NULL
,
period
,
window_length
);
}
/***********************************************************************
* TrySubmitThreadpoolCallback (KERNEL32.@)
*/
BOOL
WINAPI
TrySubmitThreadpoolCallback
(
PTP_SIMPLE_CALLBACK
callback
,
PVOID
userdata
,
TP_CALLBACK_ENVIRON
*
environment
)
{
NTSTATUS
status
;
TRACE
(
"%p, %p, %p
\n
"
,
callback
,
userdata
,
environment
);
status
=
TpSimpleTryPost
(
callback
,
userdata
,
environment
);
if
(
status
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
return
TRUE
;
}
include/winternl.h
View file @
eadd27a3
...
...
@@ -2619,6 +2619,7 @@ NTSYSAPI NTSTATUS WINAPI RtlLargeIntegerToChar(const ULONGLONG *,ULONG,ULONG,PC
/* Threadpool functions */
NTSYSAPI
NTSTATUS
WINAPI
TpAllocCleanupGroup
(
TP_CLEANUP_GROUP
**
);
NTSYSAPI
NTSTATUS
WINAPI
TpAllocPool
(
TP_POOL
**
,
PVOID
);
NTSYSAPI
NTSTATUS
WINAPI
TpAllocTimer
(
TP_TIMER
**
,
PTP_TIMER_CALLBACK
,
PVOID
,
TP_CALLBACK_ENVIRON
*
);
NTSYSAPI
NTSTATUS
WINAPI
TpAllocWork
(
TP_WORK
**
,
PTP_WORK_CALLBACK
,
PVOID
,
TP_CALLBACK_ENVIRON
*
);
NTSYSAPI
void
WINAPI
TpCallbackLeaveCriticalSectionOnCompletion
(
TP_CALLBACK_INSTANCE
*
,
RTL_CRITICAL_SECTION
*
);
...
...
@@ -2632,9 +2633,13 @@ NTSYSAPI BOOL WINAPI TpIsTimerSet(TP_TIMER *);
NTSYSAPI
void
WINAPI
TpPostWork
(
TP_WORK
*
);
NTSYSAPI
void
WINAPI
TpReleaseCleanupGroup
(
TP_CLEANUP_GROUP
*
);
NTSYSAPI
void
WINAPI
TpReleaseCleanupGroupMembers
(
TP_CLEANUP_GROUP
*
,
BOOL
,
PVOID
);
NTSYSAPI
void
WINAPI
TpReleasePool
(
TP_POOL
*
);
NTSYSAPI
void
WINAPI
TpReleaseTimer
(
TP_TIMER
*
);
NTSYSAPI
void
WINAPI
TpReleaseWork
(
TP_WORK
*
);
NTSYSAPI
void
WINAPI
TpSetPoolMaxThreads
(
TP_POOL
*
,
DWORD
);
NTSYSAPI
BOOL
WINAPI
TpSetPoolMinThreads
(
TP_POOL
*
,
DWORD
);
NTSYSAPI
void
WINAPI
TpSetTimer
(
TP_TIMER
*
,
LARGE_INTEGER
*
,
LONG
,
LONG
);
NTSYSAPI
NTSTATUS
WINAPI
TpSimpleTryPost
(
PTP_SIMPLE_CALLBACK
,
PVOID
,
TP_CALLBACK_ENVIRON
*
);
NTSYSAPI
void
WINAPI
TpWaitForTimer
(
TP_TIMER
*
,
BOOL
);
NTSYSAPI
void
WINAPI
TpWaitForWork
(
TP_WORK
*
,
BOOL
);
...
...
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