Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4b0ecd3e
Commit
4b0ecd3e
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 threadpool timer functions to ntdll.
parent
1165cc09
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
5 deletions
+50
-5
kernel32.spec
dlls/kernel32/kernel32.spec
+5
-5
thread.c
dlls/kernel32/thread.c
+40
-0
winternl.h
include/winternl.h
+5
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
4b0ecd3e
...
...
@@ -232,7 +232,7 @@
@ stdcall CloseThreadpoolCleanupGroup(ptr) ntdll.TpReleaseCleanupGroup
@ stdcall CloseThreadpoolCleanupGroupMembers(ptr long ptr) ntdll.TpReleaseCleanupGroupMembers
# @ stub CloseThreadpoolIo
# @ stub CloseThreadpool
Timer
@ stdcall CloseThreadpoolTimer(ptr) ntdll.TpRelease
Timer
# @ stub CloseThreadpoolWait
@ stdcall CloseThreadpoolWork(ptr) ntdll.TpReleaseWork
@ stdcall CmdBatNotification(long)
...
...
@@ -334,7 +334,7 @@
# @ stub CreateThreadpool
@ stdcall CreateThreadpoolCleanupGroup()
# @ stub CreateThreadpoolIo
# @ stub CreateThreadpoolTimer
@ stdcall CreateThreadpoolTimer(ptr ptr ptr)
# @ stub CreateThreadpoolWait
@ stdcall CreateThreadpoolWork(ptr ptr ptr)
@ stdcall CreateTimerQueue ()
...
...
@@ -981,7 +981,7 @@
@ stub -i386 IsSLCallback
@ stdcall IsSystemResumeAutomatic()
@ stdcall IsThreadAFiber()
# @ stub IsThreadpool
TimerSet
@ stdcall IsThreadpoolTimerSet(ptr) ntdll.TpIs
TimerSet
# @ stub IsTimeZoneRedirectionEnabled
# @ stub IsValidCalDateTime
@ stdcall IsValidCodePage(long)
...
...
@@ -1456,7 +1456,7 @@
# @ stub SetThreadpoolStackInformation
# @ stub SetThreadpoolThreadMaximum
# @ stub SetThreadpoolThreadMinimum
# @ stub SetThreadpoolTimer
@ stdcall SetThreadpoolTimer(ptr ptr long long)
# @ stub SetThreadpoolWait
@ stdcall SetTimeZoneInformation(ptr)
@ stub SetTimerQueueTimer
...
...
@@ -1571,7 +1571,7 @@
@ stdcall WaitForSingleObject(long long)
@ stdcall WaitForSingleObjectEx(long long long)
# @ stub WaitForThreadpoolIoCallbacks
# @ stub WaitForThreadpoolTimerCallbacks
@ stdcall WaitForThreadpoolTimerCallbacks(ptr long) ntdll.TpWaitForTimer
# @ stub WaitForThreadpoolWaitCallbacks
@ stdcall WaitForThreadpoolWorkCallbacks(ptr long) ntdll.TpWaitForWork
@ stdcall WaitNamedPipeA (str long)
...
...
dlls/kernel32/thread.c
View file @
4b0ecd3e
...
...
@@ -882,6 +882,27 @@ PTP_CLEANUP_GROUP WINAPI CreateThreadpoolCleanupGroup( void )
}
/***********************************************************************
* CreateThreadpoolTimer (KERNEL32.@)
*/
PTP_TIMER
WINAPI
CreateThreadpoolTimer
(
PTP_TIMER_CALLBACK
callback
,
PVOID
userdata
,
TP_CALLBACK_ENVIRON
*
environment
)
{
TP_TIMER
*
timer
;
NTSTATUS
status
;
TRACE
(
"%p, %p, %p
\n
"
,
callback
,
userdata
,
environment
);
status
=
TpAllocTimer
(
&
timer
,
callback
,
userdata
,
environment
);
if
(
status
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
NULL
;
}
return
timer
;
}
/***********************************************************************
* CreateThreadpoolWork (KERNEL32.@)
*/
PTP_WORK
WINAPI
CreateThreadpoolWork
(
PTP_WORK_CALLBACK
callback
,
PVOID
userdata
,
...
...
@@ -901,3 +922,22 @@ PTP_WORK WINAPI CreateThreadpoolWork( PTP_WORK_CALLBACK callback, PVOID userdata
return
work
;
}
/***********************************************************************
* SetThreadpoolTimer (KERNEL32.@)
*/
VOID
WINAPI
SetThreadpoolTimer
(
TP_TIMER
*
timer
,
FILETIME
*
due_time
,
DWORD
period
,
DWORD
window_length
)
{
LARGE_INTEGER
timeout
;
TRACE
(
"%p, %p, %u, %u
\n
"
,
timer
,
due_time
,
period
,
window_length
);
if
(
due_time
)
{
timeout
.
u
.
LowPart
=
due_time
->
dwLowDateTime
;
timeout
.
u
.
HighPart
=
due_time
->
dwHighDateTime
;
}
TpSetTimer
(
timer
,
due_time
?
&
timeout
:
NULL
,
period
,
window_length
);
}
include/winternl.h
View file @
4b0ecd3e
...
...
@@ -2619,11 +2619,16 @@ NTSYSAPI NTSTATUS WINAPI RtlLargeIntegerToChar(const ULONGLONG *,ULONG,ULONG,PC
/* Threadpool functions */
NTSYSAPI
NTSTATUS
WINAPI
TpAllocCleanupGroup
(
TP_CLEANUP_GROUP
**
);
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
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
TpReleaseTimer
(
TP_TIMER
*
);
NTSYSAPI
void
WINAPI
TpReleaseWork
(
TP_WORK
*
);
NTSYSAPI
void
WINAPI
TpSetTimer
(
TP_TIMER
*
,
LARGE_INTEGER
*
,
LONG
,
LONG
);
NTSYSAPI
void
WINAPI
TpWaitForTimer
(
TP_TIMER
*
,
BOOL
);
NTSYSAPI
void
WINAPI
TpWaitForWork
(
TP_WORK
*
,
BOOL
);
/* Wine internal functions */
...
...
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