mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Merge archs that have the same Pipe2 flags
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
This commit is contained in:
parent
8a280af949
commit
1ed7fa4eda
1 changed files with 3 additions and 26 deletions
|
|
@ -495,8 +495,9 @@ pub const O = switch (native_arch) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/// flags for `pipe2` and `IoUring.pipe`
|
/// flags for `pipe2` and `IoUring.pipe`
|
||||||
|
/// matches flags in `O` but specific to `pipe2` syscall
|
||||||
pub const Pipe2 = switch (native_arch) {
|
pub const Pipe2 = switch (native_arch) {
|
||||||
.x86_64, .x86, .riscv32, .riscv64, .loongarch64 => packed struct(u32) {
|
.x86_64, .x86, .riscv32, .riscv64, .loongarch64, .hexagon, .or1k, .s390x => packed struct(u32) {
|
||||||
_: u7 = 0,
|
_: u7 = 0,
|
||||||
notification_pipe: bool = false,
|
notification_pipe: bool = false,
|
||||||
_9: u3 = 0,
|
_9: u3 = 0,
|
||||||
|
|
@ -507,7 +508,7 @@ pub const Pipe2 = switch (native_arch) {
|
||||||
cloexec: bool = false,
|
cloexec: bool = false,
|
||||||
_21: u12 = 0,
|
_21: u12 = 0,
|
||||||
},
|
},
|
||||||
.aarch64, .aarch64_be, .arm, .armeb, .thumb, .thumbeb => packed struct(u32) {
|
.aarch64, .aarch64_be, .arm, .armeb, .thumb, .thumbeb, .m68k => packed struct(u32) {
|
||||||
_: u7 = 0,
|
_: u7 = 0,
|
||||||
notification_pipe: bool = false,
|
notification_pipe: bool = false,
|
||||||
_9: u3 = 0,
|
_9: u3 = 0,
|
||||||
|
|
@ -551,30 +552,6 @@ pub const Pipe2 = switch (native_arch) {
|
||||||
cloexec: bool = false,
|
cloexec: bool = false,
|
||||||
_21: u12 = 0,
|
_21: u12 = 0,
|
||||||
},
|
},
|
||||||
// matches `x86_64` above check if the full struct matches
|
|
||||||
.hexagon, .or1k, .s390x => packed struct(u32) {
|
|
||||||
_: u7 = 0,
|
|
||||||
notification_pipe: bool = false,
|
|
||||||
_9: u3 = 0,
|
|
||||||
nonblock: bool = false,
|
|
||||||
_13: u2 = 0,
|
|
||||||
direct: bool = false,
|
|
||||||
_16: u4 = 0,
|
|
||||||
cloexec: bool = false,
|
|
||||||
_21: u12 = 0,
|
|
||||||
},
|
|
||||||
// matches `aarch64` above check if the full struct matches
|
|
||||||
.m68k => packed struct(u32) {
|
|
||||||
_: u7 = 0,
|
|
||||||
notification_pipe: bool = false,
|
|
||||||
_9: u3 = 0,
|
|
||||||
nonblock: bool = false,
|
|
||||||
_13: u4 = 0,
|
|
||||||
direct: bool = false,
|
|
||||||
_18: u2 = 0,
|
|
||||||
cloexec: bool = false,
|
|
||||||
_21: u12 = 0,
|
|
||||||
},
|
|
||||||
else => @compileError("missing std.os.linux.Pipe2 flags for this architecture"),
|
else => @compileError("missing std.os.linux.Pipe2 flags for this architecture"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue