Fix some win32 definitions

You can now use psapi.dll and pdh.dll. Some TODOs for Windows have been
cleared out. We might have a working load average for the platform that
should help GNU Make work well.
This commit is contained in:
Justine Tunney 2022-03-22 19:51:27 -07:00
parent e2e0b042c1
commit c23b6ecc31
162 changed files with 847 additions and 153 deletions

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_CounterPathCallBack,CounterPathCallBack,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_LoadPerfCounterTextStringsW,LoadPerfCounterTextStringsW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhAddCounterW,PdhAddCounterW,0

View file

@ -0,0 +1,12 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhAddEnglishCounterW,PdhAddEnglishCounterW,0
.text.windows
PdhAddEnglishCounter:
push %rbp
mov %rsp,%rbp
.profilable
mov __imp_PdhAddEnglishCounterW(%rip),%rax
jmp __sysv2nt
.endfn PdhAddEnglishCounter,globl
.previous

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhBindInputDataSourceW,PdhBindInputDataSourceW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhBrowseCountersHW,PdhBrowseCountersHW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhBrowseCountersW,PdhBrowseCountersW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhCalculateCounterFromRawValue,PdhCalculateCounterFromRawValue,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhCloseLog,PdhCloseLog,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhCloseQuery,PdhCloseQuery,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhCollectQueryData,PdhCollectQueryData,0

View file

@ -0,0 +1,12 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhCollectQueryDataEx,PdhCollectQueryDataEx,0
.text.windows
PdhCollectQueryDataEx:
push %rbp
mov %rsp,%rbp
.profilable
mov __imp_PdhCollectQueryDataEx(%rip),%rax
jmp __sysv2nt
.endfn PdhCollectQueryDataEx,globl
.previous

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhCollectQueryDataWithTime,PdhCollectQueryDataWithTime,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhComputeCounterStatistics,PdhComputeCounterStatistics,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhConnectMachineW,PdhConnectMachineW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhEnumLogSetNamesW,PdhEnumLogSetNamesW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhEnumMachinesHW,PdhEnumMachinesHW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhEnumMachinesW,PdhEnumMachinesW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhEnumObjectItemsHW,PdhEnumObjectItemsHW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhEnumObjectItemsW,PdhEnumObjectItemsW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhEnumObjectsHW,PdhEnumObjectsHW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhEnumObjectsW,PdhEnumObjectsW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhExpandCounterPathW,PdhExpandCounterPathW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhExpandWildCardPathHW,PdhExpandWildCardPathHW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhExpandWildCardPathW,PdhExpandWildCardPathW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhFormatFromRawValue,PdhFormatFromRawValue,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetCounterInfoW,PdhGetCounterInfoW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetCounterTimeBase,PdhGetCounterTimeBase,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetDataSourceTimeRangeH,PdhGetDataSourceTimeRangeH,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetDataSourceTimeRangeW,PdhGetDataSourceTimeRangeW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetDefaultPerfCounterHW,PdhGetDefaultPerfCounterHW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetDefaultPerfCounterW,PdhGetDefaultPerfCounterW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetDefaultPerfObjectHW,PdhGetDefaultPerfObjectHW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetDefaultPerfObjectW,PdhGetDefaultPerfObjectW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetDllVersion,PdhGetDllVersion,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetFormattedCounterArrayW,PdhGetFormattedCounterArrayW,0

View file

@ -0,0 +1,12 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetFormattedCounterValue,PdhGetFormattedCounterValue,0
.text.windows
PdhGetFormattedCounterValue:
push %rbp
mov %rsp,%rbp
.profilable
mov __imp_PdhGetFormattedCounterValue(%rip),%rax
jmp __sysv2nt
.endfn PdhGetFormattedCounterValue,globl
.previous

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetLogFileSize,PdhGetLogFileSize,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetRawCounterArrayW,PdhGetRawCounterArrayW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhGetRawCounterValue,PdhGetRawCounterValue,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhIsRealTimeQuery,PdhIsRealTimeQuery,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhLookupPerfIndexByNameW,PdhLookupPerfIndexByNameW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhLookupPerfNameByIndexW,PdhLookupPerfNameByIndexW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhMakeCounterPathW,PdhMakeCounterPathW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhOpenLogW,PdhOpenLogW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhOpenQueryH,PdhOpenQueryH,0

View file

@ -0,0 +1,12 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhOpenQueryW,PdhOpenQueryW,0
.text.windows
PdhOpenQuery:
push %rbp
mov %rsp,%rbp
.profilable
mov __imp_PdhOpenQueryW(%rip),%rax
jmp __sysv2nt
.endfn PdhOpenQuery,globl
.previous

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhParseCounterPathW,PdhParseCounterPathW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhParseInstanceNameW,PdhParseInstanceNameW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhReadRawLogRecord,PdhReadRawLogRecord,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhRemoveCounter,PdhRemoveCounter,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhSelectDataSourceW,PdhSelectDataSourceW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhSetCounterScaleFactor,PdhSetCounterScaleFactor,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhSetDefaultRealTimeDataSource,PdhSetDefaultRealTimeDataSource,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhSetQueryTimeRange,PdhSetQueryTimeRange,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhUpdateLogFileCatalog,PdhUpdateLogFileCatalog,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhUpdateLogW,PdhUpdateLogW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhValidatePathExW,PdhValidatePathExW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PdhValidatePathW,PdhValidatePathW,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfAddCounters,PerfAddCounters,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfCloseQueryHandle,PerfCloseQueryHandle,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfCreateInstance,PerfCreateInstance,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfDecrementULongCounterValue,PerfDecrementULongCounterValue,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfDecrementULongLongCounterValue,PerfDecrementULongLongCounterValue,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfDeleteCounters,PerfDeleteCounters,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfDeleteInstance,PerfDeleteInstance,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfEnumerateCounterSet,PerfEnumerateCounterSet,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfEnumerateCounterSetInstances,PerfEnumerateCounterSetInstances,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfIncrementULongCounterValue,PerfIncrementULongCounterValue,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfIncrementULongLongCounterValue,PerfIncrementULongLongCounterValue,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfOpenQueryHandle,PerfOpenQueryHandle,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfQueryCounterData,PerfQueryCounterData,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfQueryCounterInfo,PerfQueryCounterInfo,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfQueryCounterSetRegistrationInfo,PerfQueryCounterSetRegistrationInfo,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfQueryInstance,PerfQueryInstance,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfSetCounterRefValue,PerfSetCounterRefValue,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfSetCounterSetInfo,PerfSetCounterSetInfo,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfSetULongCounterValue,PerfSetULongCounterValue,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfSetULongLongCounterValue,PerfSetULongLongCounterValue,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfStartProvider,PerfStartProvider,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfStartProviderEx,PerfStartProviderEx,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_PerfStopProvider,PerfStopProvider,0

View file

@ -0,0 +1,2 @@
.include "o/libc/nt/codegen.inc"
.imp pdh,__imp_UnloadPerfCounterTextStringsW,UnloadPerfCounterTextStringsW,0