Skip to content

Commit 7c0c28f

Browse files
committed
Refine definition of mcontext_t on x86.
1 parent ac7f0fa commit 7c0c28f

File tree

1 file changed

+22
-1
lines changed
  • src/unix/notbsd/linux/other/b32

1 file changed

+22
-1
lines changed

src/unix/notbsd/linux/other/b32/x86.rs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
11
pub type c_char = i8;
22
pub type wchar_t = i32;
3+
pub type greg_t = i32;
34

45
s! {
6+
pub struct _libc_fpreg {
7+
pub significand: [u16; 4],
8+
pub exponent: u16,
9+
}
10+
11+
pub struct _libc_fpstate {
12+
pub cw: ::c_ulong,
13+
pub sw: ::c_ulong,
14+
pub tag: ::c_ulong,
15+
pub ipoff: ::c_ulong,
16+
pub cssel: ::c_ulong,
17+
pub dataoff: ::c_ulong,
18+
pub datasel: ::c_ulong,
19+
pub _st: [_libc_fpreg; 8],
20+
pub status: ::c_ulong,
21+
}
22+
523
pub struct mcontext_t {
6-
__private: [u32; 22]
24+
pub gregs: [greg_t; 19],
25+
pub fpregs: *mut _libc_fpstate,
26+
pub oldmask: ::c_ulong,
27+
pub cr2: ::c_ulong,
728
}
829

930
pub struct ucontext_t {

0 commit comments

Comments
 (0)