This commit is contained in:
pmovzxdq 2025-11-24 08:17:19 +06:00 committed by GitHub
commit 4a8b6f7f9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3677,10 +3677,13 @@ pub const W = struct {
return TERMSIG(s) == 0;
}
pub fn IFSTOPPED(s: u32) bool {
return @as(u16, @truncate(((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00;
return ((s & 0xff) == 0x7f);
}
pub fn IFSIGNALED(s: u32) bool {
return (s & 0xffff) -% 1 < 0xff;
return (@as(i8, @bitCast(@as(u8, @intCast((s & 0x7f) + 1)))) >> 1) > 0;
}
pub fn IFCONTINUED(s: u32) bool {
return s == 0xffff;
}
};