File tree Expand file tree Collapse file tree 17 files changed +166
-54
lines changed Expand file tree Collapse file tree 17 files changed +166
-54
lines changed Original file line number Diff line number Diff line change 1+ 
Original file line number Diff line number Diff line change 1+ //! Header: `signal.h` 
2+ //! 
3+ //! https://github.com/apple-oss-distributions/Libc/blob/main/include/signal.h 
4+ 
5+ pub  use  crate :: sys:: signal:: * ; 
Original file line number Diff line number Diff line change 1+ //! Entrypoint for Apple headers, usually found as part of the xcode SDK. 
2+ 
3+ pub ( crate )  mod  xnu; 
4+ pub ( crate )  use  xnu:: * ; 
5+ 
6+ pub ( crate )  mod  alibc { 
7+     pub ( crate )  mod  signal; 
8+ } 
9+ 
10+ pub ( crate )  use  alibc:: * ; 
Original file line number Diff line number Diff line change 1+ //! Header: `arm/_mcontext.h` 
2+ //! 
3+ //! https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/arm/_mcontext.h 
4+ 
5+ pub  use  crate :: mach:: machine:: _structs:: * ; 
6+ 
7+ s !  { 
8+     pub  struct  __darwin_mcontext64 { 
9+         pub  __es:  __darwin_arm_exception_state64, 
10+         pub  __ss:  __darwin_arm_thread_state64, 
11+         pub  __ns:  __darwin_arm_neon_state64, 
12+     } 
13+ } 
14+ 
15+ pub  type  mcontext_t  = * mut  __darwin_mcontext64 ; 
Original file line number Diff line number Diff line change 1+ pub  use  crate :: mach:: machine:: _structs:: * ; 
2+ 
3+ s !  { 
4+     pub  struct  __darwin_mcontext64 { 
5+         pub  __es:  __darwin_x86_exception_state64, 
6+         pub  __ss:  __darwin_x86_thread_state64, 
7+         pub  __fs:  __darwin_x86_float_state64, 
8+     } 
9+ } 
10+ 
11+ pub  type  mcontext_t  = * mut  __darwin_mcontext64 ; 
Original file line number Diff line number Diff line change 1+ //! Header: `arm/_structs.h` 
2+ //! 
3+ //! https://github.com/apple-oss-distributions/xnu/blob/main/osfmk/mach/arm/_structs.h 
4+ 
5+ #[ cfg( target_arch = "arm" ) ]  
6+ use  crate :: prelude:: * ; 
7+ 
8+ s !  { 
9+     pub  struct  __darwin_arm_exception_state64 { 
10+         pub  __far:  u64 , 
11+         pub  __esr:  u32 , 
12+         pub  __exception:  u32 , 
13+     } 
14+ 
15+     pub  struct  __darwin_arm_thread_state64 { 
16+         pub  __x:  [ u64 ;  29 ] , 
17+         pub  __fp:  u64 , 
18+         pub  __lr:  u64 , 
19+         pub  __sp:  u64 , 
20+         pub  __pc:  u64 , 
21+         pub  __cpsr:  u32 , 
22+         pub  __pad:  u32 , 
23+     } 
24+ 
25+     #[ cfg( target_arch = "aarch64" ) ] 
26+     pub  struct  __darwin_arm_neon_state64 { 
27+         pub  __v:  [ crate :: __uint128_t;  32 ] , 
28+         pub  __fpsr:  u32 , 
29+         pub  __fpcr:  u32 , 
30+     } 
31+ 
32+     #[ cfg( target_arch = "arm" ) ] 
33+     #[ repr( align( 16 ) ) ] 
34+     pub  struct  __darwin_arm_neon_state64 { 
35+         opaque:  [ c_char;  ( 32  *  16 )  + ( 2  *  size_of:: <u32 >( ) ) ] 
36+     } 
37+ } 
Original file line number Diff line number Diff line change 1+ 
Original file line number Diff line number Diff line change 1+ //! Header: `mach/machine/_structs.h` 
2+ 
3+ cfg_if !  { 
4+     if  #[ cfg( any( target_arch = "x86" ,  target_arch = "x86_64" ) ) ]  { 
5+         pub  use  crate :: mach:: i386:: _structs:: * ; 
6+     }  else if  #[ cfg( any( target_arch = "arm" ,  target_arch = "aarch64" ) ) ]  { 
7+         pub  use  crate :: mach:: arm:: _structs:: * ; 
8+     }  else { 
9+         // Unsupported arch 
10+     } 
11+ } 
Original file line number Diff line number Diff line change 1+ pub ( crate )  mod  arm { 
2+     pub ( crate )  mod  _structs; 
3+ } 
4+ 
5+ pub ( crate )  mod  i386 { 
6+     pub ( crate )  mod  _structs; 
7+ } 
8+ 
9+ pub ( crate )  mod  machine { 
10+     pub ( crate )  mod  _structs; 
11+ } 
Original file line number Diff line number Diff line change 1+ //! Header: `machine/_mcontext.h` 
2+ 
3+ cfg_if !  { 
4+     if  #[ cfg( any( target_arch = "x86" ,  target_arch = "x86_64" ) ) ]  { 
5+         pub  use  crate :: i386:: _mcontext:: * ; 
6+     }  else if  #[ cfg( any( target_arch = "arm" ,  target_arch = "aarch64" ) ) ]  { 
7+         pub  use  crate :: arm:: _mcontext:: * ; 
8+     }  else { 
9+         // Unsupported arch 
10+     } 
11+ } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments