File tree 1 file changed +1
-19
lines changed
library/std/src/sys/pal/unix
1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -803,28 +803,10 @@ pub mod guard {
803
803
Some ( stack_ptr. with_addr ( stackaddr) )
804
804
}
805
805
806
- #[ cfg( target_os = "netbsd" ) ]
807
- unsafe fn get_stack_start ( ) -> Option < * mut libc:: c_void > {
808
- let mut ret = None ;
809
- let mut attr: libc:: pthread_attr_t = crate :: mem:: zeroed ( ) ;
810
- let e = libc:: pthread_getattr_np ( libc:: pthread_self ( ) , & mut attr) ;
811
- if e == 0 {
812
- let mut stackaddr = crate :: ptr:: null_mut ( ) ;
813
- let mut stacksize = 0 ;
814
- let mut guardsize = 0 ;
815
- assert_eq ! ( libc:: pthread_attr_getstack( & attr, & mut stackaddr, & mut stacksize) , 0 ) ;
816
- // on netbsd, we need to take in account the guard size to push up
817
- // the stack's address from the bottom.
818
- assert_eq ! ( libc:: pthread_attr_getguardsize( & attr, & mut guardsize) , 0 ) ;
819
- stackaddr = stackaddr. add ( guardsize) ;
820
- ret = Some ( stackaddr) ;
821
- }
822
- ret
823
- }
824
-
825
806
#[ cfg( any(
826
807
target_os = "android" ,
827
808
target_os = "freebsd" ,
809
+ target_os = "netbsd" ,
828
810
target_os = "hurd" ,
829
811
target_os = "linux" ,
830
812
target_os = "l4re"
You can’t perform that action at this time.
0 commit comments