aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-08-25 00:00:39 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-09-01 17:54:06 -0700
commit7f03cfe161a2f7b5abbd00ab1ea29ddd6190d435 (patch)
tree5e3a36e5d74e2d07706b817953e74f13a67c272d /lib/std/Thread.zig
parentc09ba8796c64a0bd3a39d6545b852c1b2e91f473 (diff)
downloadzig-7f03cfe161a2f7b5abbd00ab1ea29ddd6190d435.tar.gz
zig-7f03cfe161a2f7b5abbd00ab1ea29ddd6190d435.zip
std.os: more reorganization efforts
* std lib tests are passing on x86_64-linux with and without -lc * stage2 is building from source on x86_64-linux * down to 38 remaining uses of `usingnamespace`
Diffstat (limited to 'lib/std/Thread.zig')
-rw-r--r--lib/std/Thread.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig
index e322485037..155e057a3f 100644
--- a/lib/std/Thread.zig
+++ b/lib/std/Thread.zig
@@ -877,8 +877,8 @@ const LinuxThreadImpl = struct {
const mapped = os.mmap(
null,
map_bytes,
- os.PROT_NONE,
- os.MAP_PRIVATE | os.MAP_ANONYMOUS,
+ os.PROT.NONE,
+ os.MAP.PRIVATE | os.MAP.ANONYMOUS,
-1,
0,
) catch |err| switch (err) {
@@ -893,7 +893,7 @@ const LinuxThreadImpl = struct {
// map everything but the guard page as read/write
os.mprotect(
mapped[guard_offset..],
- os.PROT_READ | os.PROT_WRITE,
+ os.PROT.READ | os.PROT.WRITE,
) catch |err| switch (err) {
error.AccessDenied => unreachable,
else => |e| return e,
@@ -923,10 +923,10 @@ const LinuxThreadImpl = struct {
.thread = .{ .mapped = mapped },
};
- const flags: u32 = os.CLONE_THREAD | os.CLONE_DETACHED |
- os.CLONE_VM | os.CLONE_FS | os.CLONE_FILES |
- os.CLONE_PARENT_SETTID | os.CLONE_CHILD_CLEARTID |
- os.CLONE_SIGHAND | os.CLONE_SYSVSEM | os.CLONE_SETTLS;
+ const flags: u32 = linux.CLONE.THREAD | linux.CLONE.DETACHED |
+ linux.CLONE.VM | linux.CLONE.FS | linux.CLONE.FILES |
+ linux.CLONE.PARENT_SETTID | linux.CLONE.CHILD_CLEARTID |
+ linux.CLONE.SIGHAND | linux.CLONE.SYSVSEM | linux.CLONE.SETTLS;
switch (linux.getErrno(linux.clone(
Instance.entryFn,
@@ -978,7 +978,7 @@ const LinuxThreadImpl = struct {
switch (linux.getErrno(linux.futex_wait(
&self.thread.child_tid.value,
- linux.FUTEX_WAIT,
+ linux.FUTEX.WAIT,
tid,
null,
))) {