aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2023-03-08 01:18:33 -0800
committerRyan Liptak <squeek502@hotmail.com>2023-03-08 04:26:50 -0800
commit93b35c69998398e962bff84f3e5006afa122fbde (patch)
treeb88a6096e8aa0f8602523eadd8d0b2d092458287 /src
parent6d74c0d1b41b52bca3d66092a48660f2ee4ae4f8 (diff)
downloadzig-93b35c69998398e962bff84f3e5006afa122fbde.tar.gz
zig-93b35c69998398e962bff84f3e5006afa122fbde.zip
os.isCygwinPty: Fix a bug, replace kernel32 call, and optimize
- Fixes the first few code units of the name being omitted (it was using `@sizeOf(FILE_NAME_INFO)` as the start of the name bytes, but that includes the length of the dummy [1]u16 field and padding; instead the start should be the offset of the dummy [1]u16 field) - Replaces kernel32.GetFileInformationByHandleEx call with ntdll.NtQueryInformationFile + Contributes towards #1840 - Checks that the handle is a named pipe first before querying and checking the name, which is a much faster call than NtQueryInformationFile (this was about a 10x speedup in my probably-not-so-good/take-it-with-a-grain-of-salt benchmarking)
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions