Commit 40d403c9 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use syscall thunks for system functions.

parent e3e477e6
......@@ -847,16 +847,6 @@ BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature )
}
/******************************************************************************
* NtQuerySystemInformation [NTDLL.@]
* ZwQuerySystemInformation [NTDLL.@]
*/
NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
void *info, ULONG size, ULONG *ret_size )
{
return unix_funcs->NtQuerySystemInformation( class, info, size, ret_size );
}
/******************************************************************************
* RtlGetNativeSystemInformation [NTDLL.@]
*/
NTSTATUS WINAPI /* DECLSPEC_HOTPATCH */ RtlGetNativeSystemInformation(
......@@ -876,17 +866,6 @@ NTSTATUS WINAPI /* DECLSPEC_HOTPATCH */ RtlGetNativeSystemInformation(
}
/******************************************************************************
* NtQuerySystemInformationEx [NTDLL.@]
* ZwQuerySystemInformationEx [NTDLL.@]
*/
NTSTATUS WINAPI NtQuerySystemInformationEx( SYSTEM_INFORMATION_CLASS class,
void *query, ULONG query_len,
void *info, ULONG size, ULONG *ret_size )
{
return unix_funcs->NtQuerySystemInformationEx( class, query, query_len, info, size, ret_size );
}
/******************************************************************************
* NtSetSystemInformation [NTDLL.@]
* ZwSetSystemInformation [NTDLL.@]
*/
......@@ -994,16 +973,6 @@ NTSTATUS WINAPI NtClearPowerRequest( HANDLE handle, POWER_REQUEST_TYPE type )
}
/******************************************************************************
* NtPowerInformation [NTDLL.@]
*
*/
NTSTATUS WINAPI NtPowerInformation( POWER_INFORMATION_LEVEL level, void *input, ULONG in_size,
void *output, ULONG out_size )
{
return unix_funcs->NtPowerInformation( level, input, in_size, output, out_size );
}
/******************************************************************************
* NtShutdownSystem [NTDLL.@]
*
*/
......
......@@ -274,7 +274,7 @@
@ stdcall NtOpenThreadTokenEx(long long long long ptr)
@ stdcall -syscall NtOpenTimer(ptr long ptr)
@ stub NtPlugPlayControl
@ stdcall NtPowerInformation(long ptr long ptr long)
@ stdcall -syscall NtPowerInformation(long ptr long ptr long)
@ stdcall NtPrivilegeCheck(ptr ptr ptr)
@ stub NtPrivilegeObjectAuditAlarm
@ stub NtPrivilegedServiceAuditAlarm
......@@ -316,9 +316,9 @@
@ stdcall NtQuerySymbolicLinkObject(long ptr ptr)
@ stdcall NtQuerySystemEnvironmentValue(ptr ptr long ptr)
@ stdcall NtQuerySystemEnvironmentValueEx(ptr ptr ptr ptr ptr)
@ stdcall NtQuerySystemInformation(long ptr long ptr)
@ stdcall NtQuerySystemInformationEx(long ptr long ptr long ptr)
@ stdcall NtQuerySystemTime(ptr)
@ stdcall -syscall NtQuerySystemInformation(long ptr long ptr)
@ stdcall -syscall NtQuerySystemInformationEx(long ptr long ptr long ptr)
@ stdcall -syscall NtQuerySystemTime(ptr)
@ stdcall -syscall NtQueryTimer(ptr long ptr long ptr)
@ stdcall NtQueryTimerResolution(ptr ptr ptr)
@ stdcall NtQueryValueKey(long ptr long ptr long ptr)
......@@ -393,7 +393,7 @@
# @ stub NtSetSystemEnvironmentValueEx
@ stdcall NtSetSystemInformation(long ptr long)
@ stub NtSetSystemPowerState
@ stdcall NtSetSystemTime(ptr ptr)
@ stdcall -syscall NtSetSystemTime(ptr ptr)
@ stdcall NtSetThreadExecutionState(long ptr)
@ stdcall -syscall NtSetTimer(long ptr ptr ptr long long ptr)
@ stdcall NtSetTimerResolution(long long ptr)
......@@ -1261,7 +1261,7 @@
@ stdcall -private ZwOpenThreadTokenEx(long long long long ptr) NtOpenThreadTokenEx
@ stdcall -private -syscall ZwOpenTimer(ptr long ptr) NtOpenTimer
@ stub ZwPlugPlayControl
@ stdcall -private ZwPowerInformation(long ptr long ptr long) NtPowerInformation
@ stdcall -private -syscall ZwPowerInformation(long ptr long ptr long) NtPowerInformation
@ stdcall -private ZwPrivilegeCheck(ptr ptr ptr) NtPrivilegeCheck
@ stub ZwPrivilegeObjectAuditAlarm
@ stub ZwPrivilegedServiceAuditAlarm
......@@ -1303,9 +1303,9 @@
@ stdcall -private ZwQuerySymbolicLinkObject(long ptr ptr) NtQuerySymbolicLinkObject
@ stdcall -private ZwQuerySystemEnvironmentValue(ptr ptr long ptr) NtQuerySystemEnvironmentValue
@ stdcall -private ZwQuerySystemEnvironmentValueEx(ptr ptr ptr ptr ptr) NtQuerySystemEnvironmentValueEx
@ 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 -syscall ZwQuerySystemInformation(long ptr long ptr) NtQuerySystemInformation
@ stdcall -private -syscall ZwQuerySystemInformationEx(long ptr long ptr long ptr) NtQuerySystemInformationEx
@ stdcall -private -syscall ZwQuerySystemTime(ptr) NtQuerySystemTime
@ 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
......@@ -1380,7 +1380,7 @@
# @ stub ZwSetSystemEnvironmentValueEx
@ stdcall -private ZwSetSystemInformation(long ptr long) NtSetSystemInformation
@ stub ZwSetSystemPowerState
@ stdcall -private ZwSetSystemTime(ptr ptr) NtSetSystemTime
@ stdcall -private -syscall ZwSetSystemTime(ptr ptr) NtSetSystemTime
@ stdcall ZwSetThreadExecutionState(long ptr) NtSetThreadExecutionState
@ stdcall -private -syscall ZwSetTimer(long ptr ptr ptr long long ptr) NtSetTimer
@ stdcall -private ZwSetTimerResolution(long long ptr) NtSetTimerResolution
......
......@@ -363,24 +363,6 @@ void WINAPI RtlTimeToElapsedTimeFields( const LARGE_INTEGER *Time, PTIME_FIELDS
}
/***********************************************************************
* NtQuerySystemTime [NTDLL.@]
* ZwQuerySystemTime [NTDLL.@]
*
* Get the current system time.
*
* PARAMS
* time [O] Destination for the current system time.
*
* RETURNS
* Success: STATUS_SUCCESS.
* Failure: An NTSTATUS error code indicating the problem.
*/
NTSTATUS WINAPI NtQuerySystemTime( LARGE_INTEGER *time )
{
return unix_funcs->NtQuerySystemTime( time );
}
/***********************************************************************
* RtlGetSystemTimePrecise [NTDLL.@]
*
* Get a more accurate current system time.
......@@ -493,15 +475,6 @@ NTSTATUS WINAPI RtlSetTimeZoneInformation( const RTL_TIME_ZONE_INFORMATION *tzin
}
/***********************************************************************
* NtSetSystemTime [NTDLL.@]
* ZwSetSystemTime [NTDLL.@]
*/
NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER *new, LARGE_INTEGER *old )
{
return unix_funcs->NtSetSystemTime( new, old );
}
/***********************************************************************
* RtlQueryUnbiasedInterruptTime [NTDLL.@]
*/
BOOL WINAPI RtlQueryUnbiasedInterruptTime(ULONGLONG *time)
......
......@@ -1362,14 +1362,9 @@ static struct unix_funcs unix_funcs =
NtCurrentTeb,
NtDuplicateObject,
NtGetContextThread,
NtPowerInformation,
NtQueryObject,
NtQueryPerformanceCounter,
NtQuerySystemInformation,
NtQuerySystemInformationEx,
NtQuerySystemTime,
NtSetInformationObject,
NtSetSystemTime,
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,
RtlWaitOnAddress,
......
......@@ -28,7 +28,7 @@ struct msghdr;
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 86
#define NTDLL_UNIXLIB_VERSION 87
struct unix_funcs
{
......@@ -39,20 +39,11 @@ struct unix_funcs
HANDLE dest_process, HANDLE *dest,
ACCESS_MASK access, ULONG attributes, ULONG options );
NTSTATUS (WINAPI *NtGetContextThread)( HANDLE handle, CONTEXT *context );
NTSTATUS (WINAPI *NtPowerInformation)( POWER_INFORMATION_LEVEL level, void *input, ULONG in_size,
void *output, ULONG out_size );
NTSTATUS (WINAPI *NtQueryObject)( HANDLE handle, OBJECT_INFORMATION_CLASS info_class,
void *ptr, ULONG len, ULONG *used_len );
NTSTATUS (WINAPI *NtQueryPerformanceCounter)( LARGE_INTEGER *counter, LARGE_INTEGER *frequency );
NTSTATUS (WINAPI *NtQuerySystemInformation)( SYSTEM_INFORMATION_CLASS class,
void *info, ULONG size, ULONG *ret_size );
NTSTATUS (WINAPI *NtQuerySystemInformationEx)( SYSTEM_INFORMATION_CLASS class,
void *query, ULONG query_len,
void *info, ULONG size, ULONG *ret_size );
NTSTATUS (WINAPI *NtQuerySystemTime)( LARGE_INTEGER *time );
NTSTATUS (WINAPI *NtSetInformationObject)( HANDLE handle, OBJECT_INFORMATION_CLASS info_class,
void *ptr, ULONG len );
NTSTATUS (WINAPI *NtSetSystemTime)( const LARGE_INTEGER *new, LARGE_INTEGER *old );
/* other Win32 API functions */
NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment