File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
src/unix/bsd/netbsdlike/netbsd Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 1- use PT_FIRSTMACH ;
2-
31use crate :: prelude:: * ;
2+ use crate :: PT_FIRSTMACH ;
43
54pub type __greg_t = u64 ;
65pub type __cpu_simple_lock_nv_t = c_int ;
76pub type __gregset = [ __greg_t ; _NGREG] ;
8- pub type __fregset = [ __freg ; _NFREG] ;
7+ pub type __fregset = [ __fpreg ; _NFREG] ;
98
109s ! {
1110 pub struct mcontext_t {
1211 pub __gregs: __gregset,
13- pub __fregs: __fpregset ,
12+ pub __fregs: __fregset ,
1413 __spare: [ crate :: __greg_t; 7 ] ,
1514 }
1615}
@@ -22,6 +21,22 @@ s_no_extra_traits! {
2221 }
2322}
2423
24+ cfg_if ! {
25+ if #[ cfg( feature = "extra_traits" ) ] {
26+ impl PartialEq for __fpreg {
27+ fn eq( & self , other: & Self ) -> bool {
28+ unsafe { self . u_u64 == other. u_u64 }
29+ }
30+ }
31+ impl Eq for __fpreg { }
32+ impl hash:: Hash for __fpreg {
33+ fn hash<H : hash:: Hasher >( & self , state: & mut H ) {
34+ unsafe { self . u_u64. hash( state) } ;
35+ }
36+ }
37+ }
38+ }
39+
2540pub ( crate ) const _ALIGNBYTES: usize = size_of :: < c_long > ( ) - 1 ;
2641
2742pub const PT_GETREGS : c_int = PT_FIRSTMACH + 0 ;
You can’t perform that action at this time.
0 commit comments