| author | |
| committer | |
| log | 40bd93e2a24e3bdebd4f6454cfcffc51e5aaeeae |
| tree | 35c7fc2353b465b9882dc35ea4ef30f8017ecc80 |
| parent | c25f2fa561ecfed80e0cc2d0ffa9200ce30bb499 |
Update windows.zig
Update windows.zig
Update windows.zig
Update windows.zig
Update windows.zig
Update windows.zig
Update windows.zig
Update ntdll.zig
Update windows.zig
Update ntdll.zig
Update kernel32.zig3 files changed, 9 insertions(+), 6 deletions(-)
lib/std/os/windows.zig+2-2| ... | @@ -1812,7 +1812,7 @@ pub fn QueryPerformanceFrequency() u64 { | ... | @@ -1812,7 +1812,7 @@ pub fn QueryPerformanceFrequency() u64 { |
| 1812 | // "On systems that run Windows XP or later, the function will always succeed" | 1812 | // "On systems that run Windows XP or later, the function will always succeed" |
| 1813 | // https://docs.microsoft.com/en-us/windows/desktop/api/profileapi/nf-profileapi-queryperformancefrequency | 1813 | // https://docs.microsoft.com/en-us/windows/desktop/api/profileapi/nf-profileapi-queryperformancefrequency |
| 1814 | var result: LARGE_INTEGER = undefined; | 1814 | var result: LARGE_INTEGER = undefined; |
| 1815 | assert(kernel32.QueryPerformanceFrequency(&result) != 0); | 1815 | assert(ntdll.RtlQueryPerformanceFrequency(&result) != 0); |
| 1816 | // The kernel treats this integer as unsigned. | 1816 | // The kernel treats this integer as unsigned. |
| 1817 | return @as(u64, @bitCast(result)); | 1817 | return @as(u64, @bitCast(result)); |
| 1818 | } | 1818 | } |
| ... | @@ -1821,7 +1821,7 @@ pub fn QueryPerformanceCounter() u64 { | ... | @@ -1821,7 +1821,7 @@ pub fn QueryPerformanceCounter() u64 { |
| 1821 | // "On systems that run Windows XP or later, the function will always succeed" | 1821 | // "On systems that run Windows XP or later, the function will always succeed" |
| 1822 | // https://docs.microsoft.com/en-us/windows/desktop/api/profileapi/nf-profileapi-queryperformancecounter | 1822 | // https://docs.microsoft.com/en-us/windows/desktop/api/profileapi/nf-profileapi-queryperformancecounter |
| 1823 | var result: LARGE_INTEGER = undefined; | 1823 | var result: LARGE_INTEGER = undefined; |
| 1824 | assert(kernel32.QueryPerformanceCounter(&result) != 0); | 1824 | assert(ntdll.RtlQueryPerformanceCounter(&result) != 0); |
| 1825 | // The kernel treats this integer as unsigned. | 1825 | // The kernel treats this integer as unsigned. |
| 1826 | return @as(u64, @bitCast(result)); | 1826 | return @as(u64, @bitCast(result)); |
| 1827 | } | 1827 | } |
lib/std/os/windows/kernel32.zig-4| ... | @@ -276,10 +276,6 @@ pub extern "kernel32" fn MoveFileExW( | ... | @@ -276,10 +276,6 @@ pub extern "kernel32" fn MoveFileExW( |
| 276 | 276 | ||
| 277 | pub extern "kernel32" fn PostQueuedCompletionStatus(CompletionPort: HANDLE, dwNumberOfBytesTransferred: DWORD, dwCompletionKey: ULONG_PTR, lpOverlapped: ?*OVERLAPPED) callconv(WINAPI) BOOL; | 277 | pub extern "kernel32" fn PostQueuedCompletionStatus(CompletionPort: HANDLE, dwNumberOfBytesTransferred: DWORD, dwCompletionKey: ULONG_PTR, lpOverlapped: ?*OVERLAPPED) callconv(WINAPI) BOOL; |
| 278 | 278 | ||
| 279 | pub extern "kernel32" fn QueryPerformanceCounter(lpPerformanceCount: *LARGE_INTEGER) callconv(WINAPI) BOOL; | ||
| 280 | |||
| 281 | pub extern "kernel32" fn QueryPerformanceFrequency(lpFrequency: *LARGE_INTEGER) callconv(WINAPI) BOOL; | ||
| 282 | |||
| 283 | pub extern "kernel32" fn ReadDirectoryChangesW( | 279 | pub extern "kernel32" fn ReadDirectoryChangesW( |
| 284 | hDirectory: HANDLE, | 280 | hDirectory: HANDLE, |
| 285 | lpBuffer: [*]align(@alignOf(FILE_NOTIFY_INFORMATION)) u8, | 281 | lpBuffer: [*]align(@alignOf(FILE_NOTIFY_INFORMATION)) u8, |
lib/std/os/windows/ntdll.zig+7| ... | @@ -113,6 +113,13 @@ pub extern "ntdll" fn NtQueryAttributesFile( | ... | @@ -113,6 +113,13 @@ pub extern "ntdll" fn NtQueryAttributesFile( |
| 113 | FileAttributes: *FILE_BASIC_INFORMATION, | 113 | FileAttributes: *FILE_BASIC_INFORMATION, |
| 114 | ) callconv(WINAPI) NTSTATUS; | 114 | ) callconv(WINAPI) NTSTATUS; |
| 115 | 115 | ||
| 116 | pub extern "ntdll" fn RtlQueryPerformanceCounter(PerformanceCounter: *LARGE_INTEGER) callconv(WINAPI) BOOL; | ||
| 117 | pub extern "ntdll" fn RtlQueryPerformanceFrequency(PerformanceFrequency: *LARGE_INTEGER) callconv(WINAPI) BOOL; | ||
| 118 | pub extern "ntdll" fn NtQueryPerformanceCounter( | ||
| 119 | PerformanceCounter: *LARGE_INTEGER, | ||
| 120 | PerformanceFrequency: ?*LARGE_INTEGER, | ||
| 121 | ) callconv(WINAPI) NTSTATUS; | ||
| 122 | |||
| 116 | pub extern "ntdll" fn NtCreateFile( | 123 | pub extern "ntdll" fn NtCreateFile( |
| 117 | FileHandle: *HANDLE, | 124 | FileHandle: *HANDLE, |
| 118 | DesiredAccess: ACCESS_MASK, | 125 | DesiredAccess: ACCESS_MASK, |