| author | |
| committer | |
| log | a9b7df4ca238bbf773a08c4c2c29ec15a4bc79bb |
| tree | 6b11ea35e63458431d610e373190bee0a93b8902 |
| parent | 7534ac736727c69c7314fdf194ef6a0ec30216a7 |
| signature |
These syscalls also store the value of `euid/egid/ppid` in `r20`, but
are otherwise the same.3 files changed, 9 insertions(+), 7 deletions(-)
lib/std/os/linux.zig+1-4| ... | @@ -2266,10 +2266,7 @@ pub fn getsid(pid: pid_t) usize { | ... | @@ -2266,10 +2266,7 @@ pub fn getsid(pid: pid_t) usize { |
| 2266 | 2266 | ||
| 2267 | pub fn getpid() pid_t { | 2267 | pub fn getpid() pid_t { |
| 2268 | // Casts result to a pid_t, safety-checking >= 0, because getpid() cannot fail | 2268 | // Casts result to a pid_t, safety-checking >= 0, because getpid() cannot fail |
| 2269 | return @intCast(@as(u32, @truncate(syscall0(comptime switch (native_arch) { | 2269 | return @intCast(@as(u32, @truncate(syscall0(.getpid)))); |
| 2270 | .alpha => .getxpid, | ||
| 2271 | else => .getpid, | ||
| 2272 | })))); | ||
| 2273 | } | 2270 | } |
| 2274 | 2271 | ||
| 2275 | pub fn getppid() pid_t { | 2272 | pub fn getppid() pid_t { |
lib/std/os/linux/syscalls.zig+3-3| ... | @@ -5872,11 +5872,11 @@ pub const Alpha = enum(usize) { | ... | @@ -5872,11 +5872,11 @@ pub const Alpha = enum(usize) { |
| 5872 | brk = 17, | 5872 | brk = 17, |
| 5873 | osf_getfsstat = 18, | 5873 | osf_getfsstat = 18, |
| 5874 | lseek = 19, | 5874 | lseek = 19, |
| 5875 | getxpid = 20, | 5875 | getpid = 20, |
| 5876 | osf_mount = 21, | 5876 | osf_mount = 21, |
| 5877 | umount2 = 22, | 5877 | umount2 = 22, |
| 5878 | setuid = 23, | 5878 | setuid = 23, |
| 5879 | getxuid = 24, | 5879 | getuid = 24, |
| 5880 | exec_with_loader = 25, | 5880 | exec_with_loader = 25, |
| 5881 | ptrace = 26, | 5881 | ptrace = 26, |
| 5882 | osf_nrecvmsg = 27, | 5882 | osf_nrecvmsg = 27, |
| ... | @@ -5899,7 +5899,7 @@ pub const Alpha = enum(usize) { | ... | @@ -5899,7 +5899,7 @@ pub const Alpha = enum(usize) { |
| 5899 | osf_profil = 44, | 5899 | osf_profil = 44, |
| 5900 | open = 45, | 5900 | open = 45, |
| 5901 | osf_old_sigaction = 46, | 5901 | osf_old_sigaction = 46, |
| 5902 | getxgid = 47, | 5902 | getgid = 47, |
| 5903 | osf_sigprocmask = 48, | 5903 | osf_sigprocmask = 48, |
| 5904 | osf_getlogin = 49, | 5904 | osf_getlogin = 49, |
| 5905 | osf_setlogin = 50, | 5905 | osf_setlogin = 50, |
tools/generate_linux_syscalls.zig+5| ... | @@ -28,6 +28,11 @@ const stdlib_renames = std.StaticStringMap([]const u8).initComptime(.{ | ... | @@ -28,6 +28,11 @@ const stdlib_renames = std.StaticStringMap([]const u8).initComptime(.{ |
| 28 | // ARM EABI/Thumb. | 28 | // ARM EABI/Thumb. |
| 29 | .{ "arm_sync_file_range", "sync_file_range" }, | 29 | .{ "arm_sync_file_range", "sync_file_range" }, |
| 30 | .{ "arm_fadvise64_64", "fadvise64_64" }, | 30 | .{ "arm_fadvise64_64", "fadvise64_64" }, |
| 31 | // Alpha | ||
| 32 | // See https://github.com/torvalds/linux/blob/8bf22c33e7a172fbc72464f4cc484d23a6b412ba/arch/alpha/include/uapi/asm/unistd.h#L10 | ||
| 33 | .{ "getxpid", "getpid" }, | ||
| 34 | .{ "getxuid", "getuid" }, | ||
| 35 | .{ "getxgid", "getgid" }, | ||
| 31 | }); | 36 | }); |
| 32 | 37 | ||
| 33 | /// Filter syscalls that aren't actually syscalls. | 38 | /// Filter syscalls that aren't actually syscalls. |