File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
library/std/src/sys/pal/unix Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -709,7 +709,7 @@ mod cgroups {
709709// is created in an application with big thread-local storage requirements.
710710// See #6233 for rationale and details.
711711#[ 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 {
713713 // We use dlsym to avoid an ELF version dependency on GLIBC_PRIVATE. (#23628)
714714 // We shouldn't really be using such an internal symbol, but there's currently
715715 // no other way to account for the TLS size.
@@ -723,11 +723,11 @@ fn min_stack_size(attr: *const libc::pthread_attr_t) -> usize {
723723
724724// No point in looking up __pthread_get_minstack() on non-glibc platforms.
725725#[ 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 {
727727 libc:: PTHREAD_STACK_MIN
728728}
729729
730730#[ 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 {
732732 2048 // just a guess
733733}
You can’t perform that action at this time.
0 commit comments