Skip to content

Rollup of 7 pull requests #71951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4d3cf5b
use new interface to create threads on HermitCore
stlankes Apr 26, 2020
2c43746
use nicer code style to define DEFAULT_MIN_STACK_SIZE
stlankes Apr 27, 2020
9bcf409
x.py: Give a more helpful error message if curl isn't installed
jyn514 May 3, 2020
9c93b88
Export dataflow impls by name
ecstatic-morse May 4, 2020
095d1fd
Import dataflow impls via the `impls` submodule
ecstatic-morse May 4, 2020
32d1a4b
Use -fvisibility=hidden for libunwind
petrhosek May 5, 2020
7db74be
Ignore SGX on a few ui tests
mzohreva May 6, 2020
5087c1a
Add comment for `Ord` implementation for array
ldm0 May 6, 2020
9907ad6
Define UB in float-to-int casts to saturate
Mark-Simulacrum Apr 18, 2020
0dbce10
Pull in miri test cases
Mark-Simulacrum Apr 18, 2020
d4f31b4
Fixup tests to test both const-eval and runtime
Mark-Simulacrum Apr 19, 2020
f63b8bf
Remove warning about UB
Mark-Simulacrum Apr 21, 2020
14d608f
Rollup merge of #71269 - Mark-Simulacrum:sat-float-casts, r=nikic
Dylan-DPC May 6, 2020
a6a7c75
Rollup merge of #71591 - hermitcore:thread_create, r=hanna-kruppe
Dylan-DPC May 6, 2020
538a353
Rollup merge of #71819 - jyn514:check-for-tools, r=Mark-Simulacrum
Dylan-DPC May 6, 2020
d30988e
Rollup merge of #71893 - ecstatic-morse:dataflow-impls-import, r=jona…
Dylan-DPC May 6, 2020
c366b27
Rollup merge of #71929 - petrhosek:unwind-visibility, r=tmandry
Dylan-DPC May 6, 2020
4422cb7
Rollup merge of #71937 - mzohreva:mz/ui-tests-ignore-sgx, r=nikomatsakis
Dylan-DPC May 6, 2020
fbb4ccb
Rollup merge of #71944 - ldm0:arrordhint, r=sfackler
Dylan-DPC May 6, 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
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1375,9 +1375,9 @@ dependencies = [

[[package]]
name = "hermit-abi"
version = "0.1.10"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "725cf19794cf90aa94e65050cb4191ff5d8fa87a498383774c47b332e3af952e"
checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4"
dependencies = [
"compiler_builtins",
"libc",
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dlmalloc = { version = "0.1", features = ['rustc-dep-of-std'] }
fortanix-sgx-abi = { version = "0.3.2", features = ['rustc-dep-of-std'] }

[target.'cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_os = "hermit"))'.dependencies]
hermit-abi = { version = "0.1.10", features = ['rustc-dep-of-std'] }
hermit-abi = { version = "0.1.12", features = ['rustc-dep-of-std'] }

[target.wasm32-wasi.dependencies]
wasi = { version = "0.9.0", features = ['rustc-dep-of-std'], default-features = false }
Expand Down
13 changes: 6 additions & 7 deletions src/libstd/sys/hermit/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,24 @@ pub struct Thread {
unsafe impl Send for Thread {}
unsafe impl Sync for Thread {}

pub const DEFAULT_MIN_STACK_SIZE: usize = 262144;
pub const DEFAULT_MIN_STACK_SIZE: usize = 1 << 20;

impl Thread {
pub unsafe fn new_with_coreid(
_stack: usize,
stack: usize,
p: Box<dyn FnOnce()>,
core_id: isize,
) -> io::Result<Thread> {
let p = Box::into_raw(box p);
let mut tid: Tid = u32::MAX;
let ret = abi::spawn(
&mut tid as *mut Tid,
let tid = abi::spawn2(
thread_start,
&*p as *const _ as *const u8 as usize,
p as usize,
abi::Priority::into(abi::NORMAL_PRIO),
stack,
core_id,
);

return if ret != 0 {
return if tid == 0 {
// The thread failed to start and as a result p was not consumed. Therefore, it is
// safe to reconstruct the box so that it gets deallocated.
drop(Box::from_raw(p));
Expand Down