Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
In particular I wanted the change that makes `suspend;` illegal in the parser.
This commit is contained in:
@@ -53,6 +53,7 @@ pub fn getauxval(index: usize) usize {
|
||||
// Some architectures (and some syscalls) require 64bit parameters to be passed
|
||||
// in a even-aligned register pair.
|
||||
const require_aligned_register_pair =
|
||||
std.Target.current.cpu.arch.isPPC() or
|
||||
std.Target.current.cpu.arch.isMIPS() or
|
||||
std.Target.current.cpu.arch.isARM() or
|
||||
std.Target.current.cpu.arch.isThumb();
|
||||
@@ -633,7 +634,7 @@ pub fn tkill(tid: pid_t, sig: i32) usize {
|
||||
}
|
||||
|
||||
pub fn tgkill(tgid: pid_t, tid: pid_t, sig: i32) usize {
|
||||
return syscall2(.tgkill, @bitCast(usize, @as(isize, tgid)), @bitCast(usize, @as(isize, tid)), @bitCast(usize, @as(isize, sig)));
|
||||
return syscall3(.tgkill, @bitCast(usize, @as(isize, tgid)), @bitCast(usize, @as(isize, tid)), @bitCast(usize, @as(isize, sig)));
|
||||
}
|
||||
|
||||
pub fn link(oldpath: [*:0]const u8, newpath: [*:0]const u8, flags: i32) usize {
|
||||
@@ -1386,6 +1387,53 @@ pub fn madvise(address: [*]u8, len: usize, advice: u32) usize {
|
||||
return syscall3(.madvise, @ptrToInt(address), len, advice);
|
||||
}
|
||||
|
||||
pub fn pidfd_open(pid: pid_t, flags: u32) usize {
|
||||
return syscall2(.pidfd_open, @bitCast(usize, @as(isize, pid)), flags);
|
||||
}
|
||||
|
||||
pub fn pidfd_getfd(pidfd: fd_t, targetfd: fd_t, flags: u32) usize {
|
||||
return syscall3(
|
||||
.pidfd_getfd,
|
||||
@bitCast(usize, @as(isize, pidfd)),
|
||||
@bitCast(usize, @as(isize, targetfd)),
|
||||
flags,
|
||||
);
|
||||
}
|
||||
|
||||
pub fn pidfd_send_signal(pidfd: fd_t, sig: i32, info: ?*siginfo_t, flags: u32) usize {
|
||||
return syscall4(
|
||||
.pidfd_send_signal,
|
||||
@bitCast(usize, @as(isize, pidfd)),
|
||||
@bitCast(usize, @as(isize, sig)),
|
||||
@ptrToInt(info),
|
||||
flags,
|
||||
);
|
||||
}
|
||||
|
||||
pub fn process_vm_readv(pid: pid_t, local: [*]const iovec, local_count: usize, remote: [*]const iovec, remote_count: usize, flags: usize) usize {
|
||||
return syscall6(
|
||||
.process_vm_readv,
|
||||
@bitCast(usize, @as(isize, pid)),
|
||||
@ptrToInt(local),
|
||||
local_count,
|
||||
@ptrToInt(remote),
|
||||
remote_count,
|
||||
flags,
|
||||
);
|
||||
}
|
||||
|
||||
pub fn process_vm_writev(pid: pid_t, local: [*]const iovec, local_count: usize, remote: [*]const iovec, remote_count: usize, flags: usize) usize {
|
||||
return syscall6(
|
||||
.process_vm_writev,
|
||||
@bitCast(usize, @as(isize, pid)),
|
||||
@ptrToInt(local),
|
||||
local_count,
|
||||
@ptrToInt(remote),
|
||||
remote_count,
|
||||
flags,
|
||||
);
|
||||
}
|
||||
|
||||
test {
|
||||
if (std.Target.current.os.tag == .linux) {
|
||||
_ = @import("linux/test.zig");
|
||||
|
||||
Reference in New Issue
Block a user