authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-17 02:46:47+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-17 02:46:47+02:00
log29fb9e4da7d60f32f7efe6d280a69e020cd117a7
tree99b15acd20f98517565f384db0f2e1e193bd5ed1
parentd5481e65365f78c9ca20c29882f28bf80129e579
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.os.linux.tls: don't unnecessarily use std.posix


1 files changed, 1 insertions(+), 2 deletions(-)

lib/std/os/linux/tls.zig+1-2
...@@ -16,7 +16,6 @@ const math = std.math;...@@ -16,7 +16,6 @@ const math = std.math;
16const assert = std.debug.assert;16const assert = std.debug.assert;
17const native_arch = @import("builtin").cpu.arch;17const native_arch = @import("builtin").cpu.arch;
18const linux = std.os.linux;18const linux = std.os.linux;
19const posix = std.posix;
20const page_size_min = std.heap.page_size_min;19const page_size_min = std.heap.page_size_min;
2120
22/// Represents an ELF TLS variant.21/// Represents an ELF TLS variant.
...@@ -523,7 +522,7 @@ pub fn initStatic(phdrs: []elf.Phdr) void {...@@ -523,7 +522,7 @@ pub fn initStatic(phdrs: []elf.Phdr) void {
523}522}
524523
525inline fn mmap_tls(length: usize) usize {524inline fn mmap_tls(length: usize) usize {
526 const prot = posix.PROT.READ | posix.PROT.WRITE;525 const prot = linux.PROT.READ | linux.PROT.WRITE;
527 const flags: linux.MAP = .{ .TYPE = .PRIVATE, .ANONYMOUS = true };526 const flags: linux.MAP = .{ .TYPE = .PRIVATE, .ANONYMOUS = true };
528527
529 if (@hasField(linux.SYS, "mmap2")) {528 if (@hasField(linux.SYS, "mmap2")) {