ntdll: Use syscall thunks for timer functions.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-07-16 10:29:25 +02:00
parent 66e6d87ab8
commit aa08e15415
4 changed files with 11 additions and 74 deletions

View File

@ -147,7 +147,7 @@
# @ stub NtCancelDeviceWakeupRequest
@ stdcall NtCancelIoFile(long ptr)
@ stdcall NtCancelIoFileEx(long ptr ptr)
@ stdcall NtCancelTimer(long ptr)
@ stdcall -syscall NtCancelTimer(long ptr)
@ stdcall -syscall NtClearEvent(long)
@ stdcall NtClearPowerRequest(long long)
@ stdcall NtClose(long)
@ -184,7 +184,7 @@
@ stdcall NtCreateSymbolicLinkObject(ptr long ptr ptr)
@ stub NtCreateThread
@ stdcall NtCreateThreadEx(ptr long ptr long ptr ptr long long long long ptr)
@ stdcall NtCreateTimer(ptr long ptr long)
@ stdcall -syscall NtCreateTimer(ptr long ptr long)
@ stub NtCreateToken
@ stdcall NtCreateUserProcess(ptr ptr long long ptr ptr long long ptr ptr ptr)
# @ stub NtCreateWaitablePort
@ -272,7 +272,7 @@
@ stdcall NtOpenThread(ptr long ptr ptr)
@ stdcall NtOpenThreadToken(long long long ptr)
@ stdcall NtOpenThreadTokenEx(long long long long ptr)
@ stdcall NtOpenTimer(ptr long ptr)
@ stdcall -syscall NtOpenTimer(ptr long ptr)
@ stub NtPlugPlayControl
@ stdcall NtPowerInformation(long ptr long ptr long)
@ stdcall NtPrivilegeCheck(ptr ptr ptr)
@ -319,7 +319,7 @@
@ stdcall NtQuerySystemInformation(long ptr long ptr)
@ stdcall NtQuerySystemInformationEx(long ptr long ptr long ptr)
@ stdcall NtQuerySystemTime(ptr)
@ stdcall NtQueryTimer(ptr long ptr long ptr)
@ stdcall -syscall NtQueryTimer(ptr long ptr long ptr)
@ stdcall NtQueryTimerResolution(ptr ptr ptr)
@ stdcall NtQueryValueKey(long ptr long ptr long ptr)
@ stdcall NtQueryVirtualMemory(long ptr long ptr long ptr)
@ -395,7 +395,7 @@
@ stub NtSetSystemPowerState
@ stdcall NtSetSystemTime(ptr ptr)
@ stdcall NtSetThreadExecutionState(long ptr)
@ stdcall NtSetTimer(long ptr ptr ptr long long ptr)
@ stdcall -syscall NtSetTimer(long ptr ptr ptr long long ptr)
@ stdcall NtSetTimerResolution(long long ptr)
# @ stub NtSetUuidSeed
@ stdcall NtSetValueKey(long ptr long long ptr long)
@ -1136,7 +1136,7 @@
# @ stub ZwCancelDeviceWakeupRequest
@ stdcall -private ZwCancelIoFile(long ptr) NtCancelIoFile
@ stdcall -private ZwCancelIoFileEx(long ptr ptr) NtCancelIoFileEx
@ stdcall -private ZwCancelTimer(long ptr) NtCancelTimer
@ stdcall -private -syscall ZwCancelTimer(long ptr) NtCancelTimer
@ stdcall -private -syscall ZwClearEvent(long) NtClearEvent
@ stdcall -private ZwClearPowerRequest(long long) NtClearPowerRequest
@ stdcall -private ZwClose(long) NtClose
@ -1171,7 +1171,7 @@
@ stdcall -private -syscall ZwCreateSemaphore(ptr long ptr long long) NtCreateSemaphore
@ stdcall -private ZwCreateSymbolicLinkObject(ptr long ptr ptr) NtCreateSymbolicLinkObject
@ stub ZwCreateThread
@ stdcall -private ZwCreateTimer(ptr long ptr long) NtCreateTimer
@ stdcall -private -syscall ZwCreateTimer(ptr long ptr long) NtCreateTimer
@ stub ZwCreateToken
# @ stub ZwCreateWaitablePort
# @ stub ZwDebugActiveProcess
@ -1256,7 +1256,7 @@
@ stdcall -private ZwOpenThread(ptr long ptr ptr) NtOpenThread
@ stdcall -private ZwOpenThreadToken(long long long ptr) NtOpenThreadToken
@ stdcall -private ZwOpenThreadTokenEx(long long long long ptr) NtOpenThreadTokenEx
@ stdcall -private ZwOpenTimer(ptr long ptr) NtOpenTimer
@ stdcall -private -syscall ZwOpenTimer(ptr long ptr) NtOpenTimer
@ stub ZwPlugPlayControl
@ stdcall -private ZwPowerInformation(long ptr long ptr long) NtPowerInformation
@ stdcall -private ZwPrivilegeCheck(ptr ptr ptr) NtPrivilegeCheck
@ -1303,7 +1303,7 @@
@ stdcall -private ZwQuerySystemInformation(long ptr long ptr) NtQuerySystemInformation
@ stdcall -private ZwQuerySystemInformationEx(long ptr long ptr long ptr) NtQuerySystemInformationEx
@ stdcall -private ZwQuerySystemTime(ptr) NtQuerySystemTime
@ stdcall -private ZwQueryTimer(ptr long ptr long ptr) NtQueryTimer
@ stdcall -private -syscall ZwQueryTimer(ptr long ptr long ptr) NtQueryTimer
@ stdcall -private ZwQueryTimerResolution(ptr ptr ptr) NtQueryTimerResolution
@ stdcall -private ZwQueryValueKey(long ptr long ptr long ptr) NtQueryValueKey
@ stdcall -private ZwQueryVirtualMemory(long ptr long ptr long ptr) NtQueryVirtualMemory
@ -1379,7 +1379,7 @@
@ stub ZwSetSystemPowerState
@ stdcall -private ZwSetSystemTime(ptr ptr) NtSetSystemTime
@ stdcall ZwSetThreadExecutionState(long ptr) NtSetThreadExecutionState
@ stdcall -private ZwSetTimer(long ptr ptr ptr long long ptr) NtSetTimer
@ stdcall -private -syscall ZwSetTimer(long ptr ptr ptr long long ptr) NtSetTimer
@ stdcall -private ZwSetTimerResolution(long long ptr) NtSetTimerResolution
# @ stub ZwSetUuidSeed
@ stdcall -private ZwSetValueKey(long ptr long long ptr long) NtSetValueKey

View File

@ -139,54 +139,6 @@ NTSTATUS validate_open_object_attributes( const OBJECT_ATTRIBUTES *attr )
* Timers
*/
/**************************************************************************
* NtCreateTimer [NTDLL.@]
* ZwCreateTimer [NTDLL.@]
*/
NTSTATUS WINAPI NtCreateTimer( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr,
TIMER_TYPE type )
{
return unix_funcs->NtCreateTimer( handle, access, attr, type );
}
/**************************************************************************
* NtOpenTimer [NTDLL.@]
* ZwOpenTimer [NTDLL.@]
*/
NTSTATUS WINAPI NtOpenTimer( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
return unix_funcs->NtOpenTimer( handle, access, attr );
}
/**************************************************************************
* NtSetTimer [NTDLL.@]
* ZwSetTimer [NTDLL.@]
*/
NTSTATUS WINAPI NtSetTimer( HANDLE handle, const LARGE_INTEGER *when, PTIMER_APC_ROUTINE callback,
void *arg, BOOLEAN resume, ULONG period, BOOLEAN *state )
{
return unix_funcs->NtSetTimer( handle, when, callback, arg, resume, period, state );
}
/**************************************************************************
* NtCancelTimer [NTDLL.@]
* ZwCancelTimer [NTDLL.@]
*/
NTSTATUS WINAPI NtCancelTimer( HANDLE handle, BOOLEAN *state )
{
return unix_funcs->NtCancelTimer( handle, state );
}
/******************************************************************************
* NtQueryTimer (NTDLL.@)
*/
NTSTATUS WINAPI NtQueryTimer( HANDLE handle, TIMER_INFORMATION_CLASS class,
void *info, ULONG len, ULONG *ret_len )
{
return unix_funcs->NtQueryTimer( handle, class, info, len, ret_len );
}
/******************************************************************************
* NtQueryTimerResolution [NTDLL.@]
*/

View File

@ -1362,7 +1362,6 @@ static struct unix_funcs unix_funcs =
NtAlertThread,
NtAllocateVirtualMemory,
NtAreMappedFilesTheSame,
NtCancelTimer,
NtClose,
NtContinue,
NtCreateIoCompletion,
@ -1371,7 +1370,6 @@ static struct unix_funcs unix_funcs =
NtCreateNamedPipeFile,
NtCreateSection,
NtCreateThreadEx,
NtCreateTimer,
NtCreateUserProcess,
NtCurrentTeb,
NtDelayExecution,
@ -1395,7 +1393,6 @@ static struct unix_funcs unix_funcs =
NtOpenProcess,
NtOpenSection,
NtOpenThread,
NtOpenTimer,
NtPowerInformation,
NtProtectVirtualMemory,
NtQueryAttributesFile,
@ -1411,7 +1408,6 @@ static struct unix_funcs unix_funcs =
NtQuerySystemInformation,
NtQuerySystemInformationEx,
NtQuerySystemTime,
NtQueryTimer,
NtQueryVirtualMemory,
NtQueryVolumeInformationFile,
NtQueueApcThread,
@ -1433,7 +1429,6 @@ static struct unix_funcs unix_funcs =
NtSetIoCompletion,
NtSetLdtEntries,
NtSetSystemTime,
NtSetTimer,
NtSetVolumeInformationFile,
NtSignalAndWaitForSingleObject,
NtSuspendProcess,

View File

@ -28,7 +28,7 @@ struct msghdr;
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 78
#define NTDLL_UNIXLIB_VERSION 79
struct unix_funcs
{
@ -38,7 +38,6 @@ struct unix_funcs
NTSTATUS (WINAPI *NtAllocateVirtualMemory)( HANDLE process, PVOID *ret, ULONG_PTR zero_bits,
SIZE_T *size_ptr, ULONG type, ULONG protect );
NTSTATUS (WINAPI *NtAreMappedFilesTheSame)(PVOID addr1, PVOID addr2);
NTSTATUS (WINAPI *NtCancelTimer)( HANDLE handle, BOOLEAN *state );
NTSTATUS (WINAPI *NtClose)( HANDLE handle );
NTSTATUS (WINAPI *NtContinue)( CONTEXT *context, BOOLEAN alertable );
NTSTATUS (WINAPI *NtCreateIoCompletion)( HANDLE *handle, ACCESS_MASK access,
@ -61,8 +60,6 @@ struct unix_funcs
HANDLE process, PRTL_THREAD_START_ROUTINE start, void *param,
ULONG flags, SIZE_T zero_bits, SIZE_T stack_commit,
SIZE_T stack_reserve, PS_ATTRIBUTE_LIST *attr_list );
NTSTATUS (WINAPI *NtCreateTimer)( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr, TIMER_TYPE type );
NTSTATUS (WINAPI *NtCreateUserProcess)( HANDLE *process_handle_ptr, HANDLE *thread_handle_ptr,
ACCESS_MASK process_access, ACCESS_MASK thread_access,
OBJECT_ATTRIBUTES *process_attr, OBJECT_ATTRIBUTES *thread_attr,
@ -112,8 +109,6 @@ struct unix_funcs
NTSTATUS (WINAPI *NtOpenSection)( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr );
NTSTATUS (WINAPI *NtOpenThread)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr, const CLIENT_ID *id );
NTSTATUS (WINAPI *NtOpenTimer)( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr );
NTSTATUS (WINAPI *NtPowerInformation)( POWER_INFORMATION_LEVEL level, void *input, ULONG in_size,
void *output, ULONG out_size );
NTSTATUS (WINAPI *NtProtectVirtualMemory)( HANDLE process, PVOID *addr_ptr, SIZE_T *size_ptr,
@ -146,8 +141,6 @@ struct unix_funcs
void *query, ULONG query_len,
void *info, ULONG size, ULONG *ret_size );
NTSTATUS (WINAPI *NtQuerySystemTime)( LARGE_INTEGER *time );
NTSTATUS (WINAPI *NtQueryTimer)( HANDLE handle, TIMER_INFORMATION_CLASS class,
void *info, ULONG len, ULONG *ret_len );
NTSTATUS (WINAPI *NtQueryVirtualMemory)( HANDLE process, LPCVOID addr,
MEMORY_INFORMATION_CLASS info_class,
PVOID buffer, SIZE_T len, SIZE_T *res_len );
@ -189,9 +182,6 @@ struct unix_funcs
NTSTATUS status, SIZE_T count );
NTSTATUS (WINAPI *NtSetLdtEntries)( ULONG sel1, LDT_ENTRY entry1, ULONG sel2, LDT_ENTRY entry2 );
NTSTATUS (WINAPI *NtSetSystemTime)( const LARGE_INTEGER *new, LARGE_INTEGER *old );
NTSTATUS (WINAPI *NtSetTimer)( HANDLE handle, const LARGE_INTEGER *when,
PTIMER_APC_ROUTINE callback, void *arg,
BOOLEAN resume, ULONG period, BOOLEAN *state );
NTSTATUS (WINAPI *NtSetVolumeInformationFile)( HANDLE handle, IO_STATUS_BLOCK *io, void *info,
ULONG length, FS_INFORMATION_CLASS class );
NTSTATUS (WINAPI *NtSignalAndWaitForSingleObject)( HANDLE signal, HANDLE wait,