| ... | ... | @@ -764,19 +764,14 @@ pub const winsize = extern struct { |
| 764 | 764 | ws_ypixel: u16, |
| 765 | 765 | }; |
| 766 | 766 | |
| 767 | /// NSIG is the total number of signals defined. |
| 768 | /// As signal numbers are sequential, NSIG is one greater than the largest defined signal number. |
| 767 | 769 | pub const NSIG = if (is_mips) 128 else 65; |
| 768 | | pub const sigset_t = [128 / @sizeOf(usize)]usize; |
| 769 | 770 | |
| 770 | | pub usingnamespace if (NSIG == 65) |
| 771 | | struct { |
| 772 | | pub const all_mask = [2]u32{ 0xffffffff, 0xffffffff }; |
| 773 | | pub const app_mask = [2]u32{ 0xfffffffc, 0x7fffffff }; |
| 774 | | } |
| 775 | | else |
| 776 | | struct { |
| 777 | | pub const all_mask = [4]u32{ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; |
| 778 | | pub const app_mask = [4]u32{ 0xfffffffc, 0x7fffffff, 0xffffffff, 0xffffffff }; |
| 779 | | }; |
| 771 | pub const sigset_t = [1024 / 32]u32; |
| 772 | |
| 773 | pub const all_mask: sigset_t = [_]u32{0xffffffff} ** sigset_t.len; |
| 774 | pub const app_mask: sigset_t = [2]u32{ 0xfffffffc, 0x7fffffff } ++ [_]u32{0xffffffff} ** 30; |
| 780 | 775 | |
| 781 | 776 | pub const k_sigaction = if (is_mips) |
| 782 | 777 | extern struct { |
| ... | ... | @@ -804,7 +799,7 @@ pub const Sigaction = extern struct { |
| 804 | 799 | pub const SIG_ERR = @intToPtr(extern fn (i32, *siginfo_t, *c_void) void, maxInt(usize)); |
| 805 | 800 | pub const SIG_DFL = @intToPtr(?extern fn (i32, *siginfo_t, *c_void) void, 0); |
| 806 | 801 | pub const SIG_IGN = @intToPtr(extern fn (i32, *siginfo_t, *c_void) void, 1); |
| 807 | | pub const empty_sigset = [_]usize{0} ** sigset_t.len; |
| 802 | pub const empty_sigset = [_]u32{0} ** sigset_t.len; |
| 808 | 803 | |
| 809 | 804 | pub const in_port_t = u16; |
| 810 | 805 | pub const sa_family_t = u16; |