kernel32: Move QueryPerformanceCounter/Frequency functions to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ddf82f7c0d
commit
a311140f93
|
@ -46,51 +46,6 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(reg);
|
WINE_DEFAULT_DEBUG_CHANNEL(reg);
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* QueryPerformanceCounter (KERNEL32.@)
|
|
||||||
*
|
|
||||||
* Get the current value of the performance counter.
|
|
||||||
*
|
|
||||||
* PARAMS
|
|
||||||
* counter [O] Destination for the current counter reading
|
|
||||||
*
|
|
||||||
* RETURNS
|
|
||||||
* Success: TRUE. counter contains the current reading
|
|
||||||
* Failure: FALSE.
|
|
||||||
*
|
|
||||||
* SEE ALSO
|
|
||||||
* See QueryPerformanceFrequency.
|
|
||||||
*/
|
|
||||||
BOOL WINAPI QueryPerformanceCounter(PLARGE_INTEGER counter)
|
|
||||||
{
|
|
||||||
NtQueryPerformanceCounter( counter, NULL );
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* QueryPerformanceFrequency (KERNEL32.@)
|
|
||||||
*
|
|
||||||
* Get the resolution of the performance counter.
|
|
||||||
*
|
|
||||||
* PARAMS
|
|
||||||
* frequency [O] Destination for the counter resolution
|
|
||||||
*
|
|
||||||
* RETURNS
|
|
||||||
* Success. TRUE. Frequency contains the resolution of the counter.
|
|
||||||
* Failure: FALSE.
|
|
||||||
*
|
|
||||||
* SEE ALSO
|
|
||||||
* See QueryPerformanceCounter.
|
|
||||||
*/
|
|
||||||
BOOL WINAPI QueryPerformanceFrequency(PLARGE_INTEGER frequency)
|
|
||||||
{
|
|
||||||
LARGE_INTEGER counter;
|
|
||||||
NtQueryPerformanceCounter( &counter, frequency );
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* GetSystemInfo [KERNEL32.@]
|
* GetSystemInfo [KERNEL32.@]
|
||||||
*
|
*
|
||||||
|
|
|
@ -1169,8 +1169,8 @@
|
||||||
@ stdcall -import QueryMemoryResourceNotification(ptr ptr)
|
@ stdcall -import QueryMemoryResourceNotification(ptr ptr)
|
||||||
@ stub QueryNumberOfEventLogRecords
|
@ stub QueryNumberOfEventLogRecords
|
||||||
@ stub QueryOldestEventLogRecord
|
@ stub QueryOldestEventLogRecord
|
||||||
@ stdcall QueryPerformanceCounter(ptr)
|
@ stdcall -import QueryPerformanceCounter(ptr)
|
||||||
@ stdcall QueryPerformanceFrequency(ptr)
|
@ stdcall -import QueryPerformanceFrequency(ptr)
|
||||||
# @ stub QueryProcessAffinityUpdateMode
|
# @ stub QueryProcessAffinityUpdateMode
|
||||||
@ stdcall QueryProcessCycleTime(long ptr)
|
@ stdcall QueryProcessCycleTime(long ptr)
|
||||||
@ stdcall QueryThreadCycleTime(long ptr)
|
@ stdcall QueryThreadCycleTime(long ptr)
|
||||||
|
|
|
@ -1204,8 +1204,8 @@
|
||||||
# @ stub QueryInterruptTimePrecise
|
# @ stub QueryInterruptTimePrecise
|
||||||
@ stdcall QueryMemoryResourceNotification(ptr ptr)
|
@ stdcall QueryMemoryResourceNotification(ptr ptr)
|
||||||
# @ stub QueryOptionalDelayLoadedAPI
|
# @ stub QueryOptionalDelayLoadedAPI
|
||||||
@ stdcall QueryPerformanceCounter(ptr) kernel32.QueryPerformanceCounter
|
@ stdcall QueryPerformanceCounter(ptr) ntdll.RtlQueryPerformanceCounter
|
||||||
@ stdcall QueryPerformanceFrequency(ptr) kernel32.QueryPerformanceFrequency
|
@ stdcall QueryPerformanceFrequency(ptr) ntdll.RtlQueryPerformanceFrequency
|
||||||
@ stub QueryProcessAffinityUpdateMode
|
@ stub QueryProcessAffinityUpdateMode
|
||||||
@ stdcall QueryProcessCycleTime(long ptr) kernel32.QueryProcessCycleTime
|
@ stdcall QueryProcessCycleTime(long ptr) kernel32.QueryProcessCycleTime
|
||||||
# @ stub QueryProtectedPolicy
|
# @ stub QueryProtectedPolicy
|
||||||
|
|
|
@ -1368,8 +1368,7 @@ static DWORD query_perf_data(const WCHAR *query, DWORD *type, void *data, DWORD
|
||||||
pdb->HeaderLength = sizeof(*pdb);
|
pdb->HeaderLength = sizeof(*pdb);
|
||||||
pdb->NumObjectTypes = 0;
|
pdb->NumObjectTypes = 0;
|
||||||
pdb->DefaultObject = 0;
|
pdb->DefaultObject = 0;
|
||||||
QueryPerformanceCounter(&pdb->PerfTime);
|
NtQueryPerformanceCounter( &pdb->PerfTime, &pdb->PerfFreq );
|
||||||
QueryPerformanceFrequency(&pdb->PerfFreq);
|
|
||||||
|
|
||||||
data = pdb + 1;
|
data = pdb + 1;
|
||||||
pdb->SystemNameOffset = sizeof(*pdb);
|
pdb->SystemNameOffset = sizeof(*pdb);
|
||||||
|
|
|
@ -850,6 +850,8 @@
|
||||||
@ stub RtlQueryInformationActiveActivationContext
|
@ stub RtlQueryInformationActiveActivationContext
|
||||||
@ stub RtlQueryInterfaceMemoryStream
|
@ stub RtlQueryInterfaceMemoryStream
|
||||||
@ stdcall RtlQueryPackageIdentity(long ptr ptr ptr ptr ptr)
|
@ stdcall RtlQueryPackageIdentity(long ptr ptr ptr ptr ptr)
|
||||||
|
@ stdcall RtlQueryPerformanceCounter(ptr)
|
||||||
|
@ stdcall RtlQueryPerformanceFrequency(ptr)
|
||||||
@ stub RtlQueryProcessBackTraceInformation
|
@ stub RtlQueryProcessBackTraceInformation
|
||||||
@ stdcall RtlQueryProcessDebugInformation(long long ptr)
|
@ stdcall RtlQueryProcessDebugInformation(long long ptr)
|
||||||
@ stub RtlQueryProcessHeapInformation
|
@ stub RtlQueryProcessHeapInformation
|
||||||
|
|
|
@ -552,6 +552,23 @@ NTSTATUS WINAPI NtQueryPerformanceCounter( LARGE_INTEGER *counter, LARGE_INTEGER
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* RtlQueryPerformanceCounter [NTDLL.@]
|
||||||
|
*/
|
||||||
|
BOOL WINAPI DECLSPEC_HOTPATCH RtlQueryPerformanceCounter( LARGE_INTEGER *counter )
|
||||||
|
{
|
||||||
|
counter->QuadPart = monotonic_counter();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* RtlQueryPerformanceFrequency [NTDLL.@]
|
||||||
|
*/
|
||||||
|
BOOL WINAPI DECLSPEC_HOTPATCH RtlQueryPerformanceFrequency( LARGE_INTEGER *frequency )
|
||||||
|
{
|
||||||
|
frequency->QuadPart = TICKSPERSEC;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* NtGetTickCount (NTDLL.@)
|
* NtGetTickCount (NTDLL.@)
|
||||||
|
|
|
@ -2799,6 +2799,8 @@ NTSYSAPI NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PU
|
||||||
NTSYSAPI NTSTATUS WINAPI RtlQueryHeapInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T,PSIZE_T);
|
NTSYSAPI NTSTATUS WINAPI RtlQueryHeapInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T,PSIZE_T);
|
||||||
NTSYSAPI NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
|
NTSYSAPI NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
|
||||||
NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*);
|
NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*);
|
||||||
|
NTSYSAPI BOOL WINAPI RtlQueryPerformanceCounter(LARGE_INTEGER*);
|
||||||
|
NTSYSAPI BOOL WINAPI RtlQueryPerformanceFrequency(LARGE_INTEGER*);
|
||||||
NTSYSAPI NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER);
|
NTSYSAPI NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER);
|
||||||
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID);
|
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID);
|
||||||
NTSYSAPI NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION*);
|
NTSYSAPI NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION*);
|
||||||
|
|
Loading…
Reference in New Issue