diff options
| author | bors <bors@rust-lang.org> | 2020-02-18 11:10:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-18 11:10:51 +0000 |
| commit | 6317721cd951030f1f28801c34931c3c2322bc06 (patch) | |
| tree | fd553b64639306496f4c7123ed667f83f8fa49f8 /src/libstd/sys | |
| parent | 0176a9eef845e7421b7e2f7ef015333a41a7c027 (diff) | |
| parent | c1a05fbf00f4cf23e43036b2764a835ed4c3c96f (diff) | |
| download | rust-6317721cd951030f1f28801c34931c3c2322bc06.tar.gz rust-6317721cd951030f1f28801c34931c3c2322bc06.zip | |
Auto merge of #69258 - JohnTitor:rollup-n2hljai, r=JohnTitor
Rollup of 8 pull requests
Successful merges:
- #67272 (recursion_limit parsing handles overflows)
- #68597 (Simplify `Skip::nth` and `Skip::last` implementations)
- #68767 (macOS: avoid calling pthread_self() twice)
- #69175 (Do not ICE when encountering `yield` inside `async` block)
- #69223 (Ignore GDB versions with broken str printing.)
- #69244 (configure: set LLVM flags with a value)
- #69249 (Stabilize {f32, f64}::{LOG2_10, LOG10_2})
- #69252 (Clean out unused directories for extra disk space)
Failed merges:
r? @ghost
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/thread.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index 3ca778354e4..674d4c71138 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -255,8 +255,9 @@ pub mod guard { #[cfg(target_os = "macos")] unsafe fn get_stack_start() -> Option<*mut libc::c_void> { - let stackaddr = libc::pthread_get_stackaddr_np(libc::pthread_self()) as usize - - libc::pthread_get_stacksize_np(libc::pthread_self()); + let th = libc::pthread_self(); + let stackaddr = + libc::pthread_get_stackaddr_np(th) as usize - libc::pthread_get_stacksize_np(th); Some(stackaddr as *mut libc::c_void) } |
