pub const _ksiginfo = extern struct signo: std.c.SIGcode: i32errno: i32reason: extern union { rt: extern struct { pid: pid_t, uid: uid_t, value: sigval_t, }, child: extern struct { pid: pid_t, uid: uid_t, status: i32, utime: clock_t, stime: clock_t, }, fault: extern struct { addr: *allowzero anyopaque, trap: i32, trap2: i32, trap3: i32, }, poll: extern struct { band: i32, fd: i32, }, syscall: extern struct { sysnum: i32, retval: [2]i32, @"error": i32, args: [8]u64, }, ptrace_state: extern struct { pe_report_event: i32, option: extern union { pe_other_pid: pid_t, pe_lwp: lwpid_t, }, }, }64bit architectures insert 4bytes of padding here, this is done by correctly aligning the reason field
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84pub const _ksiginfo = extern struct {
signo: std.c.SIG,
code: i32,
errno: i32,
// 64bit architectures insert 4bytes of padding here, this is done by
// correctly aligning the reason field
reason: extern union {
rt: extern struct {
pid: pid_t,
uid: uid_t,
value: sigval_t,
},
child: extern struct {
pid: pid_t,
uid: uid_t,
status: i32,
utime: clock_t,
stime: clock_t,
},
fault: extern struct {
addr: *allowzero anyopaque,
trap: i32,
trap2: i32,
trap3: i32,
},
poll: extern struct {
band: i32,
fd: i32,
},
syscall: extern struct {
sysnum: i32,
retval: [2]i32,
@"error": i32,
args: [8]u64,
},
ptrace_state: extern struct {
pe_report_event: i32,
option: extern union {
pe_other_pid: pid_t,
pe_lwp: lwpid_t,
},
},
} align(@sizeOf(usize)),
}