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
d33d05ce
Commit
d33d05ce
authored
Jun 27, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Move timer queue functions to kernelbase.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8c63d02d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
113 deletions
+72
-113
kernel32.spec
dlls/kernel32/kernel32.spec
+5
-5
sync.c
dlls/kernel32/sync.c
+1
-103
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+5
-5
sync.c
dlls/kernelbase/sync.c
+61
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
d33d05ce
...
...
@@ -213,7 +213,7 @@
# @ stub CancelThreadpoolIo
@ stdcall CancelTimerQueueTimer(ptr ptr)
@ stdcall -import CancelWaitableTimer(long)
@ stdcall ChangeTimerQueueTimer(ptr ptr long long)
@ stdcall
-import
ChangeTimerQueueTimer(ptr ptr long long)
# @ stub CheckElevation
# @ stub CheckElevationEnabled
# @ stub CheckForReadOnlyResource
...
...
@@ -335,8 +335,8 @@
@ stdcall CreateThreadpoolTimer(ptr ptr ptr)
@ stdcall CreateThreadpoolWait(ptr ptr ptr)
@ stdcall CreateThreadpoolWork(ptr ptr ptr)
@ stdcall
CreateTimerQueue
()
@ stdcall CreateTimerQueueTimer(ptr long ptr ptr long long long)
@ stdcall
-import CreateTimerQueue
()
@ stdcall
-import
CreateTimerQueueTimer(ptr long ptr ptr long long long)
@ stdcall CreateToolhelp32Snapshot(long long)
@ stdcall -arch=x86_64 CreateUmsCompletionList(ptr)
@ stdcall -arch=x86_64 CreateUmsThreadContext(ptr)
...
...
@@ -369,8 +369,8 @@
# @ stub DisableThreadProfiling
@ stdcall DisassociateCurrentThreadFromCallback(ptr) ntdll.TpDisassociateCallback
@ stdcall DeleteTimerQueue(long)
@ stdcall
DeleteTimerQueueEx
(long long)
@ stdcall DeleteTimerQueueTimer(long long long)
@ stdcall
-import DeleteTimerQueueEx
(long long)
@ stdcall
-import
DeleteTimerQueueTimer(long long long)
@ stdcall -arch=x86_64 DeleteUmsCompletionList(ptr)
@ stdcall -arch=x86_64 DeleteUmsThreadContext(ptr)
@ stdcall DeleteVolumeMountPointA(str)
...
...
dlls/kernel32/sync.c
View file @
d33d05ce
...
...
@@ -682,40 +682,6 @@ HANDLE WINAPI OpenWaitableTimerA( DWORD access, BOOL inherit, LPCSTR name )
/***********************************************************************
* CreateTimerQueue (KERNEL32.@)
*/
HANDLE
WINAPI
CreateTimerQueue
(
void
)
{
HANDLE
q
;
NTSTATUS
status
=
RtlCreateTimerQueue
(
&
q
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
NULL
;
}
return
q
;
}
/***********************************************************************
* DeleteTimerQueueEx (KERNEL32.@)
*/
BOOL
WINAPI
DeleteTimerQueueEx
(
HANDLE
TimerQueue
,
HANDLE
CompletionEvent
)
{
NTSTATUS
status
=
RtlDeleteTimerQueueEx
(
TimerQueue
,
CompletionEvent
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
return
TRUE
;
}
/***********************************************************************
* DeleteTimerQueue (KERNEL32.@)
*/
BOOL
WINAPI
DeleteTimerQueue
(
HANDLE
TimerQueue
)
...
...
@@ -724,81 +690,13 @@ BOOL WINAPI DeleteTimerQueue(HANDLE TimerQueue)
}
/***********************************************************************
* CreateTimerQueueTimer (KERNEL32.@)
*
* Creates a timer-queue timer. This timer expires at the specified due
* time (in ms), then after every specified period (in ms). When the timer
* expires, the callback function is called.
*
* RETURNS
* nonzero on success or zero on failure
*/
BOOL
WINAPI
CreateTimerQueueTimer
(
PHANDLE
phNewTimer
,
HANDLE
TimerQueue
,
WAITORTIMERCALLBACK
Callback
,
PVOID
Parameter
,
DWORD
DueTime
,
DWORD
Period
,
ULONG
Flags
)
{
NTSTATUS
status
=
RtlCreateTimer
(
phNewTimer
,
TimerQueue
,
Callback
,
Parameter
,
DueTime
,
Period
,
Flags
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
return
TRUE
;
}
/***********************************************************************
* ChangeTimerQueueTimer (KERNEL32.@)
*
* Changes the times at which the timer expires.
*
* RETURNS
* nonzero on success or zero on failure
*/
BOOL
WINAPI
ChangeTimerQueueTimer
(
HANDLE
TimerQueue
,
HANDLE
Timer
,
ULONG
DueTime
,
ULONG
Period
)
{
NTSTATUS
status
=
RtlUpdateTimer
(
TimerQueue
,
Timer
,
DueTime
,
Period
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
return
TRUE
;
}
/***********************************************************************
* CancelTimerQueueTimer (KERNEL32.@)
*/
BOOL
WINAPI
CancelTimerQueueTimer
(
HANDLE
queue
,
HANDLE
timer
)
{
FIXME
(
"stub: %p %p
\n
"
,
queue
,
timer
);
return
FALSE
;
return
DeleteTimerQueueTimer
(
queue
,
timer
,
NULL
);
}
/***********************************************************************
* DeleteTimerQueueTimer (KERNEL32.@)
*
* Cancels a timer-queue timer.
*
* RETURNS
* nonzero on success or zero on failure
*/
BOOL
WINAPI
DeleteTimerQueueTimer
(
HANDLE
TimerQueue
,
HANDLE
Timer
,
HANDLE
CompletionEvent
)
{
NTSTATUS
status
=
RtlDeleteTimer
(
TimerQueue
,
Timer
,
CompletionEvent
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
return
TRUE
;
}
/*
...
...
dlls/kernelbase/kernelbase.spec
View file @
d33d05ce
...
...
@@ -108,7 +108,7 @@
@ stub CancelThreadpoolIo
@ stdcall CancelWaitableTimer(long)
# @ stub CeipIsOptedIn
@ stdcall ChangeTimerQueueTimer(ptr ptr long long)
kernel32.ChangeTimerQueueTimer
@ stdcall ChangeTimerQueueTimer(ptr ptr long long)
@ stdcall CharLowerA(str)
@ stdcall CharLowerBuffA(str long)
@ stdcall CharLowerBuffW(wstr long)
...
...
@@ -229,8 +229,8 @@
@ stdcall CreateThreadpoolTimer(ptr ptr ptr) kernel32.CreateThreadpoolTimer
@ stdcall CreateThreadpoolWait(ptr ptr ptr) kernel32.CreateThreadpoolWait
@ stdcall CreateThreadpoolWork(ptr ptr ptr) kernel32.CreateThreadpoolWork
@ stdcall CreateTimerQueue()
kernel32.CreateTimerQueue
@ stdcall CreateTimerQueueTimer(ptr long ptr ptr long long long)
kernel32.CreateTimerQueueTimer
@ stdcall CreateTimerQueue()
@ stdcall CreateTimerQueueTimer(ptr long ptr ptr long long long)
@ stdcall CreateWaitableTimerExW(ptr wstr long long)
@ stdcall CreateWaitableTimerW(ptr long wstr)
@ stdcall CreateWellKnownSid(long ptr ptr ptr)
...
...
@@ -257,8 +257,8 @@
# @ stub DeleteStateContainer
# @ stub DeleteStateContainerValue
# @ stub DeleteSynchronizationBarrier
@ stdcall DeleteTimerQueueEx(long long)
kernel32.DeleteTimerQueueEx
@ stdcall DeleteTimerQueueTimer(long long long)
kernel32.DeleteTimerQueueTimer
@ stdcall DeleteTimerQueueEx(long long)
@ stdcall DeleteTimerQueueTimer(long long long)
@ stdcall DeleteVolumeMountPointW(wstr) kernel32.DeleteVolumeMountPointW
@ stdcall DestroyPrivateObjectSecurity(ptr)
@ stdcall DeviceIoControl(long long ptr long ptr long ptr ptr) kernel32.DeviceIoControl
...
...
dlls/kernelbase/sync.c
View file @
d33d05ce
...
...
@@ -531,3 +531,64 @@ BOOL WINAPI DECLSPEC_HOTPATCH CancelWaitableTimer( HANDLE handle )
{
return
set_ntstatus
(
NtCancelTimer
(
handle
,
NULL
));
}
/***********************************************************************
* Timer queues
***********************************************************************/
/***********************************************************************
* CreateTimerQueue (kernelbase.@)
*/
HANDLE
WINAPI
DECLSPEC_HOTPATCH
CreateTimerQueue
(
void
)
{
HANDLE
q
;
NTSTATUS
status
=
RtlCreateTimerQueue
(
&
q
);
if
(
status
!=
STATUS_SUCCESS
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
));
return
NULL
;
}
return
q
;
}
/***********************************************************************
* CreateTimerQueueTimer (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
CreateTimerQueueTimer
(
PHANDLE
timer
,
HANDLE
queue
,
WAITORTIMERCALLBACK
callback
,
PVOID
arg
,
DWORD
when
,
DWORD
period
,
ULONG
flags
)
{
return
set_ntstatus
(
RtlCreateTimer
(
timer
,
queue
,
callback
,
arg
,
when
,
period
,
flags
));
}
/***********************************************************************
* ChangeTimerQueueTimer (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
ChangeTimerQueueTimer
(
HANDLE
queue
,
HANDLE
timer
,
ULONG
when
,
ULONG
period
)
{
return
set_ntstatus
(
RtlUpdateTimer
(
queue
,
timer
,
when
,
period
));
}
/***********************************************************************
* DeleteTimerQueueEx (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
DeleteTimerQueueEx
(
HANDLE
queue
,
HANDLE
event
)
{
return
set_ntstatus
(
RtlDeleteTimerQueueEx
(
queue
,
event
));
}
/***********************************************************************
* DeleteTimerQueueTimer (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
DeleteTimerQueueTimer
(
HANDLE
queue
,
HANDLE
timer
,
HANDLE
event
)
{
return
set_ntstatus
(
RtlDeleteTimer
(
queue
,
timer
,
event
));
}
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