about summary refs log tree commit diff
path: root/src/libstd/sys
AgeCommit message (Collapse)AuthorLines
2019-10-25Merge branch 'master' into rusty-hermit, resolve conflictsStefan Lankes-14/+13
2019-10-23Rollup merge of #64178 - mati865:clippy, r=scottmcmMazdak Farrokhzad-10/+9
More Clippy fixes for alloc, core and std Continuation of https://github.com/rust-lang/rust/pull/63805
2019-10-23Rollup merge of #65617 - newpavlov:patch-2, r=alexcrichtonYuki Okushi-4/+4
Fix WASI sleep impl Closes #65607 @sunfishcode Is it fine to use 0 for the `identifier` field? What is this field used for?
2019-10-23Some tweaksoxalica-49/+44
2019-10-22Apply clippy::while_let_on_iterator suggestionsMateusz Mikuła-2/+1
2019-10-22Apply clippy::needless_return suggestionsMateusz Mikuła-8/+8
2019-10-22Merge branch 'master' into rusty-hermitStefan Lankes-34/+2
2019-10-22Fix check of `statx`oxalica-16/+34
2019-10-21fixed ac vulnerabilityRaoul Strackx-0/+10
2019-10-20Merge branch 'master' into rusty-hermitStefan Lankes-18/+239
2019-10-20move interface to the unikernel in the crate hermit-abiStefan Lankes-113/+54
=> simplifies the maintenance of the interface
2019-10-20fix WASI sleep implArtyom Pavlov-4/+4
2019-10-20Auto merge of #65469 - mati865:libc, r=alexcrichtonbors-34/+2
Update libc to 0.2.64 Passed local tests. cc potentially interested people: @gnzlbg @tlively
2019-10-18Fix cast of stx_btime.tv_nsecoxalica-1/+1
2019-10-18Fix cfgs for current libcoxalica-89/+139
2019-10-18Prefer statx on linux if availableoxalica-7/+164
2019-10-17Rollup merge of #65316 - oconnor663:noninheritable, r=alexcrichtonMazdak Farrokhzad-1/+1
make File::try_clone produce non-inheritable handles on Windows ~**NOT READY FOR REVIEW.** This PR is currently mainly to trigger CI so that I can see what happens. (Is there a better way to trigger CI?) I don't know whether this change makes sense yet.~ (Edit: @Mark-Simulacrum clarified that CI doesn't currently run on Windows.) --- File handles shouldn't be inheritable in general. `std::process::Command` takes care of making them inheritable when child processes are spawned, and the `CREATE_PROCESS_LOCK` protects against races in that section on Windows. But `File::try_clone` has been creating inheritable file descriptors outside of that lock, which could be leaking into other child processes unintentionally. See also https://github.com/rust-lang/rust/pull/31069#discussion_r334117665.
2019-10-17Update emscripten functions declarationsMateusz Mikuła-34/+2
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-1/+2
- Compatible with Emscripten 1.38.46-upstream or later upstream. - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the old incorrect wasm32 C call ABI with the correct one, preserving the old one as wasm32_bindgen_compat for wasm-bindgen compatibility. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-13Rollup merge of #65246 - Wind-River:real_master_2, r=kennytmMazdak Farrokhzad-6/+20
vxWorks: implement get_path() and get_mode() for File fmt::Debug
2019-10-11make File::try_clone produce non-inheritable handles on WindowsJack O'Connor-1/+1
File handles shouldn't be inheritable in general. `std::process::Command` takes care of making them inheritable when child processes are spawned, and the `CREATE_PROCESS_LOCK` protects against races in that section on Windows. But `File::try_clone` has been creating inheritable file descriptors outside of that lock, which could be leaking into other child processes unintentionally. See also https://github.com/rust-lang/rust/pull/31069#discussion_r334117665.
2019-10-10vxWorks: implement get_path() and get_mode() for File fmt::DebugBaoshanPang-6/+20
2019-10-08add checking (r == 0)Baoshan Pang-1/+1
2019-10-06minor changes to follow the Rust's style guidelinesStefan Lankes-5/+10
2019-10-06redesign of the interface to the unikernel HermitCoreStefan Lankes-30/+2309
- the old interface between HermitCore and the Rust Standard Library based on a small C library (newlib) - remove this interface and call directly the unikernel - remove the dependency to the HermitCore linker - use rust-lld as linker
2019-10-04Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-1/+2
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-09-28Rollup merge of #64818 - Wind-River:master, r=alexcrichtonMazdak Farrokhzad-2/+2
update rtpSpawn's parameters type(It's prototype has been updated in libc) r? @alexcrichton
2019-09-25update rtpSpawn's parameters type(It's prototype has been updated in libc)Baoshan Pang-2/+2
2019-09-25Fix ExitStatus on FuchsiaTyler Mandry-75/+93
Fuchsia exit codes don't follow the convention of libc::WEXITSTATUS et al, and they are 64 bits instead of 32 bits. This gives Fuchsia its own representation of ExitStatus. Additionally, the zircon syscall structs were out of date, causing us to see bogus return codes.
2019-09-23remove rtp.rs, and move rtpSpawn and RTP_ID_ERROR to libcBaoshan Pang-302/+2
2019-09-20Merge pull request #25 from Wind-River/statn-salim-1/+1
rust stat should call libc stat
2019-09-20rust stat should call libc statBaoshan Pang-1/+1
2019-09-20No home directory on vxWorksBaoshan Pang-22/+1
2019-09-14Rollup merge of #64393 - Wind-River:master_002_envKey, r=alexcrichtonMazdak Farrokhzad-2/+1
declare EnvKey before use to fix build error r? @alexcrichton
2019-09-14Rollup merge of #64372 - Wind-River:master, r=alexcrichtonMazdak Farrokhzad-7/+14
use randSecure and randABytes r? @alexcrichton cc @n-salim
2019-09-10declare EnvKey before use to fix build errorBaoshan Pang-2/+1
2019-09-11Rollup merge of #64129 - Wind-River:master_003, r=alexcrichtonMazdak Farrokhzad-5/+3
vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn r? @alexcrichton cc @n-salim
2019-09-10use randSecure and randABytesBaoshan Pang-7/+14
2019-09-10remove Copyright noticBaoshan Pang-6/+0
2019-09-07Rollup merge of #64023 - tmandry:libstd-fuchsia-fixes, r=cramertjMazdak Farrokhzad-27/+76
libstd fuchsia fixes This fixes two bugs in libstd on Fuchsia: - `zx_time_t` was changed to an `i64`, but this never made it into libstd - When spawning processes where any of the stdio were null, libstd attempts to open `/dev/null`, which doesn't exist on Fuchsia r? @cramertj
2019-09-06Rollup merge of #64198 - cramertj:fuchsia-monotonic, r=alexcrichtonMazdak Farrokhzad-0/+1
Add Fuchsia to actually_monotonic Fuchsia provides a fully monotonic clock. Fix https://github.com/rust-lang/rust/issues/64196 cc @joshlf @tmandry r? @alexcrichton
2019-09-06Rollup merge of #64186 - alexcrichton:improve-env-codegen, r=sfacklerMazdak Farrokhzad-33/+42
std: Improve downstream codegen in `Command::env` This commit rejiggers the generics used in the implementation of `Command::env` with the purpose of reducing the amount of codegen that needs to happen in consumer crates, instead preferring to generate code into libstd. This was found when profiling the compile times of the `cc` crate where the binary rlib produced had a lot of `BTreeMap` code compiled into it but the crate doesn't actually use `BTreeMap`. It turns out that `Command::env` is generic enough to codegen the entire implementation in calling crates, but in this case there's no performance concern so it's fine to compile the code into the standard library. This change is done by removing the generic on the `CommandEnv` map which is intended to handle case-insensitive variables on Windows. Instead now a generic isn't used but rather a `use` statement defined per-platform is used. With this commit a debug build of `Command::new("foo").env("a", "b")` drops from 21k lines of LLVM IR to 10k.
2019-09-06Rollup merge of #63676 - newpavlov:wasi, r=alexcrichtonMazdak Farrokhzad-434/+323
Use wasi crate for Core API Blocked by: CraneStation/rust-wasi#5 Blocks: rust-lang/libc#1461 cc @sunfishcode @alexcrichton
2019-09-05Add Fuchsia to actually_monotonicTaylor Cramer-0/+1
Fuchsia provides a fully monotonic clock.
2019-09-05std: Improve downstream codegen in `Command::env`Alex Crichton-33/+42
This commit rejiggers the generics used in the implementation of `Command::env` with the purpose of reducing the amount of codegen that needs to happen in consumer crates, instead preferring to generate code into libstd. This was found when profiling the compile times of the `cc` crate where the binary rlib produced had a lot of `BTreeMap` code compiled into it but the crate doesn't actually use `BTreeMap`. It turns out that `Command::env` is generic enough to codegen the entire implementation in calling crates, but in this case there's no performance concern so it's fine to compile the code into the standard library. This change is done by removing the generic on the `CommandEnv` map which is intended to handle case-insensitive variables on Windows. Instead now a generic isn't used but rather a `use` statement defined per-platform is used. With this commit a debug build of `Command::new("foo").env("a", "b")` drops from 21k lines of LLVM IR to 10k.
2019-09-05Rollup merge of #64030 - jethrogb:jb/sgx-sync-issues, r=alexcrichtonMazdak Farrokhzad-20/+32
Fix unlock ordering in SGX synchronization primitives Avoid holding spinlocks during usercalls. This should avoid deadlocks in certain pathological scheduling cases. cc @mzohreva @parthsane r? @alexcrichton
2019-09-01vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass ↵Baoshan Pang-3/+7
initial stack size to rtpSpawn
2019-08-31Auto merge of #64025 - Wind-River:master_003, r=alexcrichtonbors-324/+0
remove directory libstd/sys/vxworks/backtrace which is not used any more r? @alexcrichton cc @n-salim
2019-08-30Fix unlock ordering in SGX synchronization primitivesJethro Beekman-20/+32
2019-08-30fuchsia: Fix default environment behavior when spawningTyler Mandry-2/+5