File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -709,7 +709,7 @@ mod cgroups {
709
709
// is created in an application with big thread-local storage requirements.
710
710
// See #6233 for rationale and details.
711
711
#[ cfg( all( target_os = "linux" , target_env = "gnu" ) ) ]
712
- fn min_stack_size ( attr : * const libc:: pthread_attr_t ) -> usize {
712
+ unsafe fn min_stack_size ( attr : * const libc:: pthread_attr_t ) -> usize {
713
713
// We use dlsym to avoid an ELF version dependency on GLIBC_PRIVATE. (#23628)
714
714
// We shouldn't really be using such an internal symbol, but there's currently
715
715
// no other way to account for the TLS size.
@@ -723,11 +723,11 @@ fn min_stack_size(attr: *const libc::pthread_attr_t) -> usize {
723
723
724
724
// No point in looking up __pthread_get_minstack() on non-glibc platforms.
725
725
#[ cfg( all( not( all( target_os = "linux" , target_env = "gnu" ) ) , not( target_os = "netbsd" ) ) ) ]
726
- fn min_stack_size ( _: * const libc:: pthread_attr_t ) -> usize {
726
+ unsafe fn min_stack_size ( _: * const libc:: pthread_attr_t ) -> usize {
727
727
libc:: PTHREAD_STACK_MIN
728
728
}
729
729
730
730
#[ cfg( target_os = "netbsd" ) ]
731
- fn min_stack_size ( _: * const libc:: pthread_attr_t ) -> usize {
731
+ unsafe fn min_stack_size ( _: * const libc:: pthread_attr_t ) -> usize {
732
732
2048 // just a guess
733
733
}
You can’t perform that action at this time.
0 commit comments