about summary refs log tree commit diff
path: root/library/std/src/sys/hermit
AgeCommit message (Collapse)AuthorLines
2023-04-03Rollup merge of #109722 - hermitcore:read, r=Mark-SimulacrumMatthias Krüger-7/+24
Implement read_buf for RustHermit In principle, this PR extends rust-lang/rust#108326 for RustyHermit.
2023-03-29Rollup merge of #107387 - joboet:hermit_random, r=ChrisDentonMatthias Krüger-2/+11
Use random `HashMap` keys on Hermit Initializing the keys with random data provided by the libOS avoids HashDOS attacks and similar issues. CC `@stlankes`
2023-03-29Implement read_buf for RustHermitStefan Lankes-7/+24
In principle, this PR extends rust-lang/rust#108326 for RustyHermit. Signed-off-by: Stefan Lankes <slankes@eonerc.rwth-aachen.de>
2023-03-29std: use `cvt` to handle errors from `read_entropy` on Hermitjoboet-9/+3
2023-03-19fix typo in the creation of OpenOptionStefan Lankes-1/+1
Due to this typo we have to build a workaround for issue hermitcore/libhermit-rs#191. RustyHermit is a tier 3 platform and backward compatibility does not have to be guaranteed.
2023-02-27use `as_ptr` to determine the address of atomicsStefan Lankes-3/+3
2023-02-26remove unused importsStefan Lankes-1/+0
2023-02-26std: use random HashMap keys on Hermitjoboet-2/+17
2023-02-24remove code duplicationsStefan Lankes-1/+56
2023-02-24move IO traits to std/src/os/hermitStefan Lankes-367/+12
By moving the IO traits, the RustyHermit support is harmonized to of other operating systems.
2023-02-24add support of RustyHermit's BSD socket layerStefan Lankes-455/+795
RustHermit publishs a new kernel interface and supports a common BSD socket layer. By supporting this interface, the implementation can be harmonized to other operating systems. To realize this socket layer, the handling of file descriptors is also harmonized to other operating systems.
2023-02-12Hermit: Remove floor symbolMartin Kröning-5/+0
This symbol should be provided by Hermit.
2023-01-17refactor[std]: do not use box syntaxjoboet-18/+9
2022-11-29hermit: Remove unused exportsMartin Kröning-3/+1
2022-11-29hermit: Fix fuzzy_provenance_castsMartin Kröning-1/+2
2022-11-06std: remove lock wrappers in `sys_common`joboet-3/+3
2022-10-13std: use `sync::Mutex` for internal staticsjoboet-52/+26
2022-10-03Reduce CString allocations in std as much as possibleAlex Saveau-9/+4
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2022-09-09std: use futex-based locks and thread parker on Hermitjoboet-452/+47
2022-09-08Rollup merge of #101423 - mkroening:hermit-warnings, r=sanxiynMichael Goulet-4/+0
Fix hermit warnings This fixes two `unused_imprt` and one `dead_code` warning for hermit.
2022-09-08Rollup merge of #101422 - mkroening:hermit-file-time, r=joshtriplettDylan DPC-0/+12
Hermit: Add File::set_time stub This is not supported on hermit yet. This change is required for compiling std.
2022-09-04Auto merge of #100576 - joboet:movable_const_remutex, r=Mark-Simulacrumbors-3/+0
Make `ReentrantMutex` movable and `const` As `MovableMutex` is now `const`, it can be used to simplify the implementation and interface of the internal reentrant mutex type. Consequently, the standard error stream does not need to be wrapped in `OnceLock` and `OnceLock::get_or_init_pin()` can be removed.
2022-09-05Hermit: Remove unused socklen_t (dead_code)Martin Kröning-2/+0
2022-09-05Hermit: Fix unused_importsMartin Kröning-2/+0
2022-09-05Hermit: Add File::set_time stubMartin Kröning-0/+12
This is not supported on hermit yet. This change is required for compiling std.
2022-09-03std: make `ReentrantMutex` movable and `const`; simplify `Stdout` initializationjoboet-3/+0
2022-08-28Support `#[unix_sigpipe = "inherit|sig_dfl|sig_ign"]` on `fn main()`Martin Nordholts-1/+1
This makes it possible to instruct libstd to never touch the signal handler for `SIGPIPE`, which makes programs pipeable by default (e.g. with `./your-program | head -n 1`) without `ErrorKind::BrokenPipe` errors.
2022-08-18Address reviewer commentsNick Cameron-1/+1
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-08-05non-linux platformsNick Cameron-3/+3
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-06-26Hermit: Make Mutex::init a no-opMartin Kröning-3/+1
2022-06-26Hermit: Fix initializing lazy locksMartin Kröning-6/+24
2022-06-08remove unneeded codeStefan Lankes-5/+0
2022-06-03Use Drop instead of destroy() for locks.Mara Bos-12/+7
2022-05-09Use Rust 2021 prelude in std itself.Mara Bos-2/+0
2022-04-16Use a single ReentrantMutex implementation on all platforms.Mara Bos-36/+0
2022-04-14library: Remove definitions and reexports of `strlen` from libstdVadim Petrochenkov-10/+0
2022-04-06Rename RWLock to RwLock in std::sys.Mara Bos-7/+7
2022-03-22Move std::sys::{mutex, condvar, rwlock} to std::sys::locks.Mara Bos-6/+12
2022-02-15remove compiler warningsStefan Lankes-1/+1
2022-02-13make Instant::{duration_since, elapsed, sub} saturating and remove workaroundsThe8472-8/+0
This removes all mutex/atomics based workarounds for non-monotonic clocks and makes the previously panicking methods saturating instead. Effectively this moves the monotonization from `Instant` construction to the comparisons. This has some observable effects, especially on platforms without monotonic clocks: * Incorrectly ordered Instant comparisons no longer panic. This may hide some programming errors until someone actually looks at the resulting `Duration` * `checked_duration_since` will now return `None` in more cases. Previously it only happened when one compared instants obtained in the wrong order or manually created ones. Now it also does on backslides. The upside is reduced complexity and lower overhead of `Instant::now`.
2022-02-04Hide Repr details from io::Error, and rework `io::Error::new_const`.Thom Chiovoloni-37/+36
2021-12-09Auto merge of #81156 - DrMeepster:read_buf, r=joshtriplettbors-2/+6
Implement most of RFC 2930, providing the ReadBuf abstraction This replaces the `Initializer` abstraction for permitting reading into uninitialized buffers, closing #42788. This leaves several APIs described in the RFC out of scope for the initial implementation: * read_buf_vectored * `ReadBufs` Closes #42788, by removing the relevant APIs.
2021-11-24Improving the readabilityStefan Lankes-1/+1
Co-authored-by: kennytm <kennytm@gmail.com>
2021-11-24If the thread does not get the lock in the short term, yield the CPUStefan Lankes-1/+10
Reduces the amount of wasted processor cycles
2021-11-02more efficent File::read_buf impl for windows and unixDrMeepster-2/+6
2021-10-29hermit: Implement Condvar::wait_timeoutMartin Kröning-2/+14
2021-10-16remove compiler warningsStefan Lankes-1/+1
2021-09-28Rename `std::thread::available_onccurrency` to ↵Yoshua Wuyts-1/+1
`std::thread::available_parallelism`
2021-08-30add `TcpStream::set_linger` and `TcpStream::linger`ibraheemdev-0/+8
2021-08-13Don't put hermit mutexes in a box.Martin Kröning-1/+1
Hermit mutexes are movable.