authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-03-15 16:59:05-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-03-15 16:59:05-07:00
logce4245f873c68cfcc431deb303383f25f6d50855
treebe29f6d6d6bfa1c8fc7a8f20d61f19215a62554a
parentcb419a1a8692cdbd612c6b63b65ba9a02e23c6c1
parentd7cf25f5ca40e5cbcd739911e773769a62c2abe1
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #19312 from mikdusan/bsd-debitrot

bsd: debitrot

11 files changed, 108 insertions(+), 73 deletions(-)

lib/compiler_rt/emutls.zig+2-2
...@@ -246,7 +246,7 @@ const emutls_control = extern struct {...@@ -246,7 +246,7 @@ const emutls_control = extern struct {
246 // Two threads could race against the same emutls_control.246 // Two threads could race against the same emutls_control.
247247
248 // Use atomic for reading coherent value lockless.248 // Use atomic for reading coherent value lockless.
249 const index_lockless = @atomicLoad(usize, &self.object.index, .Acquire);249 const index_lockless = @atomicLoad(usize, &self.object.index, .acquire);
250250
251 if (index_lockless != 0) {251 if (index_lockless != 0) {
252 // index is already initialized, return it.252 // index is already initialized, return it.
...@@ -264,7 +264,7 @@ const emutls_control = extern struct {...@@ -264,7 +264,7 @@ const emutls_control = extern struct {
264 }264 }
265265
266 // Store a new index atomically (for having coherent index_lockless reading).266 // Store a new index atomically (for having coherent index_lockless reading).
267 @atomicStore(usize, &self.object.index, emutls_control.next_index, .Release);267 @atomicStore(usize, &self.object.index, emutls_control.next_index, .release);
268268
269 // Increment the next available index269 // Increment the next available index
270 emutls_control.next_index += 1;270 emutls_control.next_index += 1;
lib/std/Thread/Futex.zig+4-4
...@@ -801,7 +801,7 @@ const PosixImpl = struct {...@@ -801,7 +801,7 @@ const PosixImpl = struct {
801 assert(std.c.pthread_mutex_lock(&bucket.mutex) == .SUCCESS);801 assert(std.c.pthread_mutex_lock(&bucket.mutex) == .SUCCESS);
802 defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS);802 defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS);
803803
804 cancelled = ptr.load(.Monotonic) != expect;804 cancelled = ptr.load(.monotonic) != expect;
805 if (cancelled) {805 if (cancelled) {
806 return;806 return;
807 }807 }
...@@ -855,14 +855,14 @@ const PosixImpl = struct {...@@ -855,14 +855,14 @@ const PosixImpl = struct {
855 // The pending count increment in wait() must also now use seq_cst for the update + this pending load855 // The pending count increment in wait() must also now use seq_cst for the update + this pending load
856 // to be in the same modification order as our load isn't using release/acquire to guarantee it.856 // to be in the same modification order as our load isn't using release/acquire to guarantee it.
857 bucket.pending.fence(.seq_cst);857 bucket.pending.fence(.seq_cst);
858 if (bucket.pending.load(.Monotonic) == 0) {858 if (bucket.pending.load(.monotonic) == 0) {
859 return;859 return;
860 }860 }
861861
862 // Keep a list of all the waiters notified and wake then up outside the mutex critical section.862 // Keep a list of all the waiters notified and wake then up outside the mutex critical section.
863 var notified = WaitList{};863 var notified = WaitList{};
864 defer if (notified.len > 0) {864 defer if (notified.len > 0) {
865 const pending = bucket.pending.fetchSub(notified.len, .Monotonic);865 const pending = bucket.pending.fetchSub(notified.len, .monotonic);
866 assert(pending >= notified.len);866 assert(pending >= notified.len);
867867
868 while (notified.pop()) |waiter| {868 while (notified.pop()) |waiter| {
...@@ -875,7 +875,7 @@ const PosixImpl = struct {...@@ -875,7 +875,7 @@ const PosixImpl = struct {
875 defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS);875 defer assert(std.c.pthread_mutex_unlock(&bucket.mutex) == .SUCCESS);
876876
877 // Another pending check again to avoid the WaitQueue lookup if not necessary.877 // Another pending check again to avoid the WaitQueue lookup if not necessary.
878 if (bucket.pending.load(.Monotonic) > 0) {878 if (bucket.pending.load(.monotonic) > 0) {
879 notified = WaitQueue.remove(&bucket.treap, address, max_waiters);879 notified = WaitQueue.remove(&bucket.treap, address, max_waiters);
880 }880 }
881 }881 }
lib/std/Thread/RwLock.zig+1-1
...@@ -375,5 +375,5 @@ test "concurrent access" {...@@ -375,5 +375,5 @@ test "concurrent access" {
375375
376 try testing.expectEqual(num_writes, runner.writes);376 try testing.expectEqual(num_writes, runner.writes);
377377
378 //std.debug.print("reads={}\n", .{ runner.reads.load(.Unordered)});378 //std.debug.print("reads={}\n", .{ runner.reads.load(.unordered)});
379}379}
lib/std/atomic.zig+1-1
...@@ -159,7 +159,7 @@ test Value {...@@ -159,7 +159,7 @@ test Value {
159 // acquire ensures count decrement and code before159 // acquire ensures count decrement and code before
160 // previous unrefs()s happens-before we call dropFn160 // previous unrefs()s happens-before we call dropFn
161 // below.161 // below.
162 // Another alternative is to use .AcqRel on the162 // Another alternative is to use .acq_rel on the
163 // fetchSub count decrement but it's extra barrier in163 // fetchSub count decrement but it's extra barrier in
164 // possibly hot path.164 // possibly hot path.
165 rc.count.fence(.acquire);165 rc.count.fence(.acquire);
lib/std/c.zig+85-17
...@@ -1502,25 +1502,19 @@ pub extern "c" fn closedir(dp: *DIR) c_int;...@@ -1502,25 +1502,19 @@ pub extern "c" fn closedir(dp: *DIR) c_int;
1502pub extern "c" fn telldir(dp: *DIR) c_long;1502pub extern "c" fn telldir(dp: *DIR) c_long;
1503pub extern "c" fn seekdir(dp: *DIR, loc: c_long) void;1503pub extern "c" fn seekdir(dp: *DIR, loc: c_long) void;
15041504
1505pub extern "c" fn clock_gettime(clk_id: c_int, tp: *c.timespec) c_int;
1506pub extern "c" fn clock_getres(clk_id: c_int, tp: *c.timespec) c_int;
1507pub extern "c" fn gettimeofday(noalias tv: ?*c.timeval, noalias tz: ?*c.timezone) c_int;
1508pub extern "c" fn nanosleep(rqtp: *const c.timespec, rmtp: ?*c.timespec) c_int;
1509
1510pub extern "c" fn getrusage(who: c_int, usage: *c.rusage) c_int;
1511
1512pub extern "c" fn sched_yield() c_int;
1513
1514pub extern "c" fn sigaction(sig: c_int, noalias act: ?*const c.Sigaction, noalias oact: ?*c.Sigaction) c_int;
1515pub extern "c" fn sigprocmask(how: c_int, noalias set: ?*const c.sigset_t, noalias oset: ?*c.sigset_t) c_int;
1516pub extern "c" fn sigfillset(set: ?*c.sigset_t) void;
1517pub extern "c" fn sigwait(set: ?*c.sigset_t, sig: ?*c_int) c_int;1505pub extern "c" fn sigwait(set: ?*c.sigset_t, sig: ?*c_int) c_int;
15181506
1519pub extern "c" fn socket(domain: c_uint, sock_type: c_uint, protocol: c_uint) c_int;
1520
1521pub extern "c" fn alarm(seconds: c_uint) c_uint;1507pub extern "c" fn alarm(seconds: c_uint) c_uint;
15221508
1523pub extern "c" fn msync(addr: *align(page_size) const anyopaque, len: usize, flags: c_int) c_int;1509pub const clock_getres = switch (native_os) {
1510 .netbsd => private.__clock_getres50,
1511 else => private.clock_getres,
1512};
1513
1514pub const clock_gettime = switch (native_os) {
1515 .netbsd => private.__clock_gettime50,
1516 else => private.clock_gettime,
1517};
15241518
1525pub const fstat = switch (native_os) {1519pub const fstat = switch (native_os) {
1526 .macos => switch (native_arch) {1520 .macos => switch (native_arch) {
...@@ -1539,6 +1533,31 @@ pub const fstatat = switch (native_os) {...@@ -1539,6 +1533,31 @@ pub const fstatat = switch (native_os) {
1539 else => private.fstatat,1533 else => private.fstatat,
1540};1534};
15411535
1536pub const getdirentries = switch (native_os) {
1537 .macos, .ios, .tvos, .watchos => private.__getdirentries64,
1538 else => private.getdirentries,
1539};
1540
1541pub const getrusage = switch (native_os) {
1542 .netbsd => private.__getrusage50,
1543 else => private.getrusage,
1544};
1545
1546pub const gettimeofday = switch (native_os) {
1547 .netbsd => private.__gettimeofday50,
1548 else => private.gettimeofday,
1549};
1550
1551pub const msync = switch (native_os) {
1552 .netbsd => private.__msync13,
1553 else => private.msync,
1554};
1555
1556pub const nanosleep = switch (native_os) {
1557 .netbsd => private.__nanosleep50,
1558 else => private.nanosleep,
1559};
1560
1542pub const readdir = switch (native_os) {1561pub const readdir = switch (native_os) {
1543 .macos => switch (native_arch) {1562 .macos => switch (native_arch) {
1544 .x86_64 => private.@"readdir$INODE64",1563 .x86_64 => private.@"readdir$INODE64",
...@@ -1549,10 +1568,35 @@ pub const readdir = switch (native_os) {...@@ -1549,10 +1568,35 @@ pub const readdir = switch (native_os) {
1549};1568};
15501569
1551pub const realpath = switch (native_os) {1570pub const realpath = switch (native_os) {
1552 .macos, .ios, .watchos, .tvos => private.@"realpath$DARWIN_EXTSN",1571 .macos, .ios, .tvos, .watchos => private.@"realpath$DARWIN_EXTSN",
1553 else => private.realpath,1572 else => private.realpath,
1554};1573};
15551574
1575pub const sched_yield = switch (native_os) {
1576 .netbsd => private.__libc_thr_yield,
1577 else => private.sched_yield,
1578};
1579
1580pub const sigaction = switch (native_os) {
1581 .netbsd => private.__sigaction14,
1582 else => private.sigaction,
1583};
1584
1585pub const sigfillset = switch (native_os) {
1586 .netbsd => private.__sigfillset14,
1587 else => private.sigfillset,
1588};
1589
1590pub const sigprocmask = switch (native_os) {
1591 .netbsd => private.__sigprocmask14,
1592 else => private.sigprocmask,
1593};
1594
1595pub const socket = switch (native_os) {
1596 .netbsd => private.__socket30,
1597 else => private.socket,
1598};
1599
1556pub const stat = switch (native_os) {1600pub const stat = switch (native_os) {
1557 .macos => switch (native_arch) {1601 .macos => switch (native_arch) {
1558 .x86_64 => private.@"stat$INODE64",1602 .x86_64 => private.@"stat$INODE64",
...@@ -1680,7 +1724,6 @@ pub extern "c" fn recvfrom(...@@ -1680,7 +1724,6 @@ pub extern "c" fn recvfrom(
1680pub extern "c" fn recvmsg(sockfd: c.fd_t, msg: *c.msghdr, flags: u32) isize;1724pub extern "c" fn recvmsg(sockfd: c.fd_t, msg: *c.msghdr, flags: u32) isize;
16811725
1682pub extern "c" fn kill(pid: c.pid_t, sig: c_int) c_int;1726pub extern "c" fn kill(pid: c.pid_t, sig: c_int) c_int;
1683pub extern "c" fn getdirentries(fd: c.fd_t, buf_ptr: [*]u8, nbytes: usize, basep: *i64) isize;
16841727
1685pub extern "c" fn setuid(uid: c.uid_t) c_int;1728pub extern "c" fn setuid(uid: c.uid_t) c_int;
1686pub extern "c" fn setgid(gid: c.gid_t) c_int;1729pub extern "c" fn setgid(gid: c.gid_t) c_int;
...@@ -1878,10 +1921,22 @@ else...@@ -1878,10 +1921,22 @@ else
1878 };1921 };
18791922
1880const private = struct {1923const private = struct {
1924 extern "c" fn clock_getres(clk_id: c_int, tp: *c.timespec) c_int;
1925 extern "c" fn clock_gettime(clk_id: c_int, tp: *c.timespec) c_int;
1881 extern "c" fn fstat(fd: c.fd_t, buf: *c.Stat) c_int;1926 extern "c" fn fstat(fd: c.fd_t, buf: *c.Stat) c_int;
1882 extern "c" fn fstatat(dirfd: c.fd_t, path: [*:0]const u8, buf: *c.Stat, flag: u32) c_int;1927 extern "c" fn fstatat(dirfd: c.fd_t, path: [*:0]const u8, buf: *c.Stat, flag: u32) c_int;
1928 extern "c" fn getdirentries(fd: c.fd_t, buf_ptr: [*]u8, nbytes: usize, basep: *i64) isize;
1929 extern "c" fn getrusage(who: c_int, usage: *c.rusage) c_int;
1930 extern "c" fn gettimeofday(noalias tv: ?*c.timeval, noalias tz: ?*c.timezone) c_int;
1931 extern "c" fn msync(addr: *align(page_size) const anyopaque, len: usize, flags: c_int) c_int;
1932 extern "c" fn nanosleep(rqtp: *const c.timespec, rmtp: ?*c.timespec) c_int;
1883 extern "c" fn readdir(dir: *c.DIR) ?*c.dirent;1933 extern "c" fn readdir(dir: *c.DIR) ?*c.dirent;
1884 extern "c" fn realpath(noalias file_name: [*:0]const u8, noalias resolved_name: [*]u8) ?[*:0]u8;1934 extern "c" fn realpath(noalias file_name: [*:0]const u8, noalias resolved_name: [*]u8) ?[*:0]u8;
1935 extern "c" fn sched_yield() c_int;
1936 extern "c" fn sigaction(sig: c_int, noalias act: ?*const c.Sigaction, noalias oact: ?*c.Sigaction) c_int;
1937 extern "c" fn sigfillset(set: ?*c.sigset_t) void;
1938 extern "c" fn sigprocmask(how: c_int, noalias set: ?*const c.sigset_t, noalias oset: ?*c.sigset_t) c_int;
1939 extern "c" fn socket(domain: c_uint, sock_type: c_uint, protocol: c_uint) c_int;
1885 extern "c" fn stat(noalias path: [*:0]const u8, noalias buf: *c.Stat) c_int;1940 extern "c" fn stat(noalias path: [*:0]const u8, noalias buf: *c.Stat) c_int;
18861941
1887 /// macos modernized symbols.1942 /// macos modernized symbols.
...@@ -1894,7 +1949,20 @@ const private = struct {...@@ -1894,7 +1949,20 @@ const private = struct {
18941949
1895 /// macos modernized symbols.1950 /// macos modernized symbols.
1896 extern "c" fn @"realpath$DARWIN_EXTSN"(noalias file_name: [*:0]const u8, noalias resolved_name: [*]u8) ?[*:0]u8;1951 extern "c" fn @"realpath$DARWIN_EXTSN"(noalias file_name: [*:0]const u8, noalias resolved_name: [*]u8) ?[*:0]u8;
1952 extern "c" fn __getdirentries64(fd: c.fd_t, buf_ptr: [*]u8, buf_len: usize, basep: *i64) isize;
18971953
1898 /// netbsd modernized symbols.1954 /// netbsd modernized symbols.
1955 extern "c" fn __clock_getres50(clk_id: c_int, tp: *c.timespec) c_int;
1956 extern "c" fn __clock_gettime50(clk_id: c_int, tp: *c.timespec) c_int;
1899 extern "c" fn __fstat50(fd: c.fd_t, buf: *c.Stat) c_int;1957 extern "c" fn __fstat50(fd: c.fd_t, buf: *c.Stat) c_int;
1958 extern "c" fn __getrusage50(who: c_int, usage: *c.rusage) c_int;
1959 extern "c" fn __gettimeofday50(noalias tv: ?*c.timeval, noalias tz: ?*c.timezone) c_int;
1960 extern "c" fn __libc_thr_yield() c_int;
1961 extern "c" fn __msync13(addr: *align(std.mem.page_size) const anyopaque, len: usize, flags: c_int) c_int;
1962 extern "c" fn __nanosleep50(rqtp: *const c.timespec, rmtp: ?*c.timespec) c_int;
1963 extern "c" fn __sigaction14(sig: c_int, noalias act: ?*const c.Sigaction, noalias oact: ?*c.Sigaction) c_int;
1964 extern "c" fn __sigfillset14(set: ?*c.sigset_t) void;
1965 extern "c" fn __sigprocmask14(how: c_int, noalias set: ?*const c.sigset_t, noalias oset: ?*c.sigset_t) c_int;
1966 extern "c" fn __socket30(domain: c_uint, sock_type: c_uint, protocol: c_uint) c_int;
1967 extern "c" fn __stat50(path: [*:0]const u8, buf: *c.Stat) c_int;
1900};1968};
lib/std/c/darwin.zig-3
...@@ -924,9 +924,6 @@ pub extern "c" fn os_unfair_lock_trylock(o: os_unfair_lock_t) bool;...@@ -924,9 +924,6 @@ pub extern "c" fn os_unfair_lock_trylock(o: os_unfair_lock_t) bool;
924pub extern "c" fn os_unfair_lock_assert_owner(o: os_unfair_lock_t) void;924pub extern "c" fn os_unfair_lock_assert_owner(o: os_unfair_lock_t) void;
925pub extern "c" fn os_unfair_lock_assert_not_owner(o: os_unfair_lock_t) void;925pub extern "c" fn os_unfair_lock_assert_not_owner(o: os_unfair_lock_t) void;
926926
927// XXX: close -> close$NOCANCEL
928// XXX: getdirentries -> _getdirentries64
929
930// See: https://opensource.apple.com/source/xnu/xnu-6153.141.1/bsd/sys/_types.h.auto.html927// See: https://opensource.apple.com/source/xnu/xnu-6153.141.1/bsd/sys/_types.h.auto.html
931// TODO: audit mode_t/pid_t, should likely be u16/i32928// TODO: audit mode_t/pid_t, should likely be u16/i32
932pub const blkcnt_t = i64;929pub const blkcnt_t = i64;
lib/std/c/dragonfly.zig+6
...@@ -494,6 +494,12 @@ pub const sockaddr = extern struct {...@@ -494,6 +494,12 @@ pub const sockaddr = extern struct {
494 addr: [16]u8,494 addr: [16]u8,
495 scope_id: u32,495 scope_id: u32,
496 };496 };
497
498 pub const un = extern struct {
499 len: u8 = @sizeOf(un),
500 family: sa_family_t = AF.UNIX,
501 path: [104]u8,
502 };
497};503};
498504
499pub const Kevent = extern struct {505pub const Kevent = extern struct {
lib/std/c/netbsd.zig-33
...@@ -18,47 +18,14 @@ pub extern "c" fn _lwp_self() lwpid_t;...@@ -18,47 +18,14 @@ pub extern "c" fn _lwp_self() lwpid_t;
18pub extern "c" fn pipe2(fds: *[2]fd_t, flags: std.c.O) c_int;18pub extern "c" fn pipe2(fds: *[2]fd_t, flags: std.c.O) c_int;
19pub extern "c" fn arc4random_buf(buf: [*]u8, len: usize) void;19pub extern "c" fn arc4random_buf(buf: [*]u8, len: usize) void;
2020
21pub extern "c" fn __stat50(path: [*:0]const u8, buf: *Stat) c_int;
22pub const stat = __stat50;
23
24pub extern "c" fn __clock_gettime50(clk_id: c_int, tp: *timespec) c_int;
25pub const clock_gettime = __clock_gettime50;
26
27pub extern "c" fn __clock_getres50(clk_id: c_int, tp: *timespec) c_int;
28pub const clock_getres = __clock_getres50;
29
30pub extern "c" fn __getdents30(fd: c_int, buf_ptr: [*]u8, nbytes: usize) c_int;21pub extern "c" fn __getdents30(fd: c_int, buf_ptr: [*]u8, nbytes: usize) c_int;
31pub const getdents = __getdents30;22pub const getdents = __getdents30;
3223
33pub extern "c" fn __sigaltstack14(ss: ?*stack_t, old_ss: ?*stack_t) c_int;24pub extern "c" fn __sigaltstack14(ss: ?*stack_t, old_ss: ?*stack_t) c_int;
34pub const sigaltstack = __sigaltstack14;25pub const sigaltstack = __sigaltstack14;
3526
36pub extern "c" fn __nanosleep50(rqtp: *const timespec, rmtp: ?*timespec) c_int;
37pub const nanosleep = __nanosleep50;
38
39pub extern "c" fn __sigaction14(sig: c_int, noalias act: ?*const Sigaction, noalias oact: ?*Sigaction) c_int;
40pub const sigaction = __sigaction14;
41
42pub extern "c" fn __sigprocmask14(how: c_int, noalias set: ?*const sigset_t, noalias oset: ?*sigset_t) c_int;
43pub const sigprocmask = __sigaction14;
44
45pub extern "c" fn __socket30(domain: c_uint, sock_type: c_uint, protocol: c_uint) c_int;
46pub const socket = __socket30;
47
48pub extern "c" fn __gettimeofday50(noalias tv: ?*timeval, noalias tz: ?*timezone) c_int;
49pub const gettimeofday = __gettimeofday50;
50
51pub extern "c" fn __getrusage50(who: c_int, usage: *rusage) c_int;
52pub const getrusage = __getrusage50;
53
54pub extern "c" fn __libc_thr_yield() c_int;
55pub const sched_yield = __libc_thr_yield;
56
57pub extern "c" fn posix_memalign(memptr: *?*anyopaque, alignment: usize, size: usize) c_int;27pub extern "c" fn posix_memalign(memptr: *?*anyopaque, alignment: usize, size: usize) c_int;
5828
59pub extern "c" fn __msync13(addr: *align(std.mem.page_size) const anyopaque, len: usize, flags: c_int) c_int;
60pub const msync = __msync13;
61
62pub const pthread_spin_t = switch (builtin.cpu.arch) {29pub const pthread_spin_t = switch (builtin.cpu.arch) {
63 .aarch64, .aarch64_be, .aarch64_32 => u8,30 .aarch64, .aarch64_be, .aarch64_32 => u8,
64 .mips, .mipsel, .mips64, .mips64el => u32,31 .mips, .mipsel, .mips64, .mips64el => u32,
lib/std/fs/Dir.zig+2-5
...@@ -49,7 +49,7 @@ pub const Iterator = switch (builtin.os.tag) {...@@ -49,7 +49,7 @@ pub const Iterator = switch (builtin.os.tag) {
49 posix.lseek_SET(self.dir.fd, 0) catch unreachable; // EBADF here likely means that the Dir was not opened with iteration permissions49 posix.lseek_SET(self.dir.fd, 0) catch unreachable; // EBADF here likely means that the Dir was not opened with iteration permissions
50 self.first_iter = false;50 self.first_iter = false;
51 }51 }
52 const rc = posix.system.__getdirentries64(52 const rc = posix.system.getdirentries(
53 self.dir.fd,53 self.dir.fd,
54 &self.buf,54 &self.buf,
55 self.buf.len,55 self.buf.len,
...@@ -161,10 +161,7 @@ pub const Iterator = switch (builtin.os.tag) {...@@ -161,10 +161,7 @@ pub const Iterator = switch (builtin.os.tag) {
161 posix.lseek_SET(self.dir.fd, 0) catch unreachable; // EBADF here likely means that the Dir was not opened with iteration permissions161 posix.lseek_SET(self.dir.fd, 0) catch unreachable; // EBADF here likely means that the Dir was not opened with iteration permissions
162 self.first_iter = false;162 self.first_iter = false;
163 }163 }
164 const rc = if (builtin.os.tag == .netbsd)164 const rc = posix.system.getdents(self.dir.fd, &self.buf, self.buf.len);
165 posix.system.__getdents30(self.dir.fd, &self.buf, self.buf.len)
166 else
167 posix.system.getdents(self.dir.fd, &self.buf, self.buf.len);
168 switch (posix.errno(rc)) {165 switch (posix.errno(rc)) {
169 .SUCCESS => {},166 .SUCCESS => {},
170 .BADF => unreachable, // Dir is invalid or was opened without iteration ability167 .BADF => unreachable, // Dir is invalid or was opened without iteration ability
src/Air.zig+3-3
...@@ -727,11 +727,11 @@ pub const Inst = struct {...@@ -727,11 +727,11 @@ pub const Inst = struct {
727 /// Result type is always `void`.727 /// Result type is always `void`.
728 /// Uses the `bin_op` field. LHS is pointer, RHS is element.728 /// Uses the `bin_op` field. LHS is pointer, RHS is element.
729 atomic_store_unordered,729 atomic_store_unordered,
730 /// Same as `atomic_store_unordered` but with `AtomicOrder.Monotonic`.730 /// Same as `atomic_store_unordered` but with `AtomicOrder.monotonic`.
731 atomic_store_monotonic,731 atomic_store_monotonic,
732 /// Same as `atomic_store_unordered` but with `AtomicOrder.Release`.732 /// Same as `atomic_store_unordered` but with `AtomicOrder.release`.
733 atomic_store_release,733 atomic_store_release,
734 /// Same as `atomic_store_unordered` but with `AtomicOrder.SeqCst`.734 /// Same as `atomic_store_unordered` but with `AtomicOrder.seq_cst`.
735 atomic_store_seq_cst,735 atomic_store_seq_cst,
736 /// Atomically read-modify-write via a pointer.736 /// Atomically read-modify-write via a pointer.
737 /// Result type is the element type of the pointer.737 /// Result type is the element type of the pointer.
src/arch/sparc64/CodeGen.zig+4-4
...@@ -647,10 +647,10 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {...@@ -647,10 +647,10 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
647 .call_never_tail => try self.airCall(inst, .never_tail),647 .call_never_tail => try self.airCall(inst, .never_tail),
648 .call_never_inline => try self.airCall(inst, .never_inline),648 .call_never_inline => try self.airCall(inst, .never_inline),
649649
650 .atomic_store_unordered => @panic("TODO try self.airAtomicStore(inst, .Unordered)"),650 .atomic_store_unordered => @panic("TODO try self.airAtomicStore(inst, .unordered)"),
651 .atomic_store_monotonic => @panic("TODO try self.airAtomicStore(inst, .Monotonic)"),651 .atomic_store_monotonic => @panic("TODO try self.airAtomicStore(inst, .monotonic)"),
652 .atomic_store_release => @panic("TODO try self.airAtomicStore(inst, .Release)"),652 .atomic_store_release => @panic("TODO try self.airAtomicStore(inst, .release)"),
653 .atomic_store_seq_cst => @panic("TODO try self.airAtomicStore(inst, .SeqCst)"),653 .atomic_store_seq_cst => @panic("TODO try self.airAtomicStore(inst, .seq_cst)"),
654654
655 .struct_field_ptr_index_0 => try self.airStructFieldPtrIndex(inst, 0),655 .struct_field_ptr_index_0 => try self.airStructFieldPtrIndex(inst, 0),
656 .struct_field_ptr_index_1 => try self.airStructFieldPtrIndex(inst, 1),656 .struct_field_ptr_index_1 => try self.airStructFieldPtrIndex(inst, 1),