File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -1366,9 +1366,9 @@ dependencies = [
13661366
13671367[[package ]]
13681368name = " hermit-abi"
1369- version = " 0.1.10 "
1369+ version = " 0.1.12 "
13701370source = " registry+https://github.com/rust-lang/crates.io-index"
1371- checksum = " 725cf19794cf90aa94e65050cb4191ff5d8fa87a498383774c47b332e3af952e "
1371+ checksum = " 61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4 "
13721372dependencies = [
13731373 " compiler_builtins" ,
13741374 " libc" ,
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ dlmalloc = { version = "0.1", features = ['rustc-dep-of-std'] }
4141fortanix-sgx-abi = { version = " 0.3.2" , features = [' rustc-dep-of-std' ] }
4242
4343[target .'cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_os = "hermit"))' .dependencies ]
44- hermit-abi = { version = " 0.1.10 " , features = [' rustc-dep-of-std' ] }
44+ hermit-abi = { version = " 0.1.12 " , features = [' rustc-dep-of-std' ] }
4545
4646[target .wasm32-wasi .dependencies ]
4747wasi = { version = " 0.9.0" , features = [' rustc-dep-of-std' ], default-features = false }
Original file line number Diff line number Diff line change @@ -16,25 +16,24 @@ pub struct Thread {
1616unsafe impl Send for Thread { }
1717unsafe impl Sync for Thread { }
1818
19- pub const DEFAULT_MIN_STACK_SIZE : usize = 262144 ;
19+ pub const DEFAULT_MIN_STACK_SIZE : usize = 1_048_576 ;
2020
2121impl Thread {
2222 pub unsafe fn new_with_coreid (
23- _stack : usize ,
23+ stack : usize ,
2424 p : Box < dyn FnOnce ( ) > ,
2525 core_id : isize ,
2626 ) -> io:: Result < Thread > {
2727 let p = Box :: into_raw ( box p) ;
28- let mut tid: Tid = u32:: MAX ;
29- let ret = abi:: spawn (
30- & mut tid as * mut Tid ,
28+ let tid = abi:: spawn2 (
3129 thread_start,
32- & * p as * const _ as * const u8 as usize ,
30+ p as usize ,
3331 abi:: Priority :: into ( abi:: NORMAL_PRIO ) ,
32+ stack,
3433 core_id,
3534 ) ;
3635
37- return if ret ! = 0 {
36+ return if tid = = 0 {
3837 // The thread failed to start and as a result p was not consumed. Therefore, it is
3938 // safe to reconstruct the box so that it gets deallocated.
4039 drop ( Box :: from_raw ( p) ) ;
You can’t perform that action at this time.
0 commit comments