ntdll: Use syscall thunks for system functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e3e477e6a1
commit
40d403c926
|
@ -846,16 +846,6 @@ BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature )
|
|||
return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[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.@]
|
||||
*/
|
||||
|
@ -875,17 +865,6 @@ NTSTATUS WINAPI /* DECLSPEC_HOTPATCH */ RtlGetNativeSystemInformation(
|
|||
return NtQuerySystemInformation( SystemInformationClass, SystemInformation, Length, ResultLength );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* 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.@]
|
||||
|
@ -993,16 +972,6 @@ NTSTATUS WINAPI NtClearPowerRequest( HANDLE handle, POWER_REQUEST_TYPE type )
|
|||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* 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
|
||||
|
|
|
@ -362,24 +362,6 @@ void WINAPI RtlTimeToElapsedTimeFields( const LARGE_INTEGER *Time, PTIME_FIELDS
|
|||
TimeFields->Hour = rem / 60;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* 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.@]
|
||||
*
|
||||
|
@ -492,15 +474,6 @@ NTSTATUS WINAPI RtlSetTimeZoneInformation( const RTL_TIME_ZONE_INFORMATION *tzin
|
|||
return STATUS_PRIVILEGE_NOT_HELD;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* NtSetSystemTime [NTDLL.@]
|
||||
* ZwSetSystemTime [NTDLL.@]
|
||||
*/
|
||||
NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER *new, LARGE_INTEGER *old )
|
||||
{
|
||||
return unix_funcs->NtSetSystemTime( new, old );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RtlQueryUnbiasedInterruptTime [NTDLL.@]
|
||||
*/
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue