re-apply a commit dropped in this branch due to conflicts

This commit reapplies 4f0aa7d639e099b18df583cb984412037fbb1dbe.
This commit is contained in:
Andrew Kelley 2021-08-31 19:19:35 -07:00
parent 5a4cc24c0e
commit 1a492d5156
3 changed files with 3 additions and 3 deletions

View File

@ -204,7 +204,7 @@ pub const W = struct {
return TERMSIG(s) == 0;
}
pub fn IFSTOPPED(s: u32) bool {
return @intCast(u16, (((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00;
return @truncate(u16, (((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00;
}
pub fn IFSIGNALED(s: u32) bool {
return (s & 0xffff) -% 1 < 0xff;

View File

@ -431,7 +431,7 @@ pub const W = struct {
return TERMSIG(s) == 0;
}
pub fn IFSTOPPED(s: u32) bool {
return @intCast(u16, (((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00;
return @truncate(u16, (((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00;
}
pub fn IFSIGNALED(s: u32) bool {
return (s & 0xffff) -% 1 < 0xff;

View File

@ -1788,7 +1788,7 @@ pub const W = struct {
return TERMSIG(s) == 0;
}
pub fn IFSTOPPED(s: u32) bool {
return @intCast(u16, ((s & 0xffff) *% 0x10001) >> 8) > 0x7f00;
return @truncate(u16, ((s & 0xffff) *% 0x10001) >> 8) > 0x7f00;
}
pub fn IFSIGNALED(s: u32) bool {
return (s & 0xffff) -% 1 < 0xff;