Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ac19dff
Updating str.chars docs to mention crates.io.
sdegutis Jan 23, 2020
5c962c7
Rename `FunctionRetTy` to `FnRetTy`
JohnTitor Feb 15, 2020
dcad07a
parser: `macro_rules` is a weak keyword
petrochenkov Feb 15, 2020
302b9e4
Improve #Safety in various methods in core::ptr
amosonn Feb 15, 2020
351782d
Improve #Safety of core::ptr::replace
amosonn Jan 31, 2020
40ca167
Improve #Safety in various methods in core::ptr
amosonn Jan 31, 2020
cadf9ef
Clean up E0309 explanation
GuillaumeGomez Feb 15, 2020
3300725
Fix running rustdoc-js test suite individually
ollie27 Feb 15, 2020
759526e
Fix printing of `Yield` terminator
jonas-schievink Feb 15, 2020
67068f3
macOS: avoid calling pthread_self() twice
kubo39 Feb 2, 2020
bb482eb
suspend -> yield
jonas-schievink Feb 16, 2020
943e653
Improve #Safety of core::ptr::drop_in_place
amosonn Feb 14, 2020
bec5d37
debug_assert a few more raw pointer methods
RalfJung Feb 16, 2020
d1a7ae7
Allow whitespaces in revision flags
JohnTitor Feb 16, 2020
6d919b5
Rollup merge of #68495 - sdegutis:patch-1, r=Mark-Simulacrum
JohnTitor Feb 16, 2020
e4192ac
Rollup merge of #68701 - amosonn:patch-2, r=RalfJung
JohnTitor Feb 16, 2020
4d2a325
Rollup merge of #68767 - kubo39:patch-macos, r=shepmaster
JohnTitor Feb 16, 2020
5eb634e
Rollup merge of #69179 - JohnTitor:rename-to-fnretty, r=Centril
JohnTitor Feb 16, 2020
ed186e8
Rollup merge of #69186 - petrochenkov:kwrules, r=Centril
JohnTitor Feb 16, 2020
9766340
Rollup merge of #69188 - GuillaumeGomez:clean-up-e0309, r=Dylan-DPC
JohnTitor Feb 16, 2020
53d4a87
Rollup merge of #69198 - ollie27:rustbuild_rustdoc-js, r=Mark-Simulacrum
JohnTitor Feb 16, 2020
0deb037
Rollup merge of #69200 - jonas-schievink:yield-print, r=eddyb,Zoxc
JohnTitor Feb 16, 2020
c8a2b43
Rollup merge of #69205 - JohnTitor:allow-whitespaces, r=Mark-Simulacrum
JohnTitor Feb 16, 2020
f34cf8d
Rollup merge of #69208 - RalfJung:debug-assert, r=Mark-Simulacrum
JohnTitor Feb 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
macOS: avoid calling pthread_self() twice
  • Loading branch information
kubo39 committed Feb 16, 2020
commit 67068f35dd41409c8e79710f1335cc9dc64f1860
5 changes: 3 additions & 2 deletions src/libstd/sys/unix/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down