about summary refs log tree commit diff
path: root/src/libstd/sys/hermit
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-2499/+0
2020-07-24Rollup merge of #72954 - hermitcore:rwlock, r=dtolnayManish Goregaokar-40/+139
revise RwLock for HermitCore - current version is derived from the wasm implementation - increasing the readability of `Condvar` - simplify the interface to the libos
2020-07-12adjust remaining targetsRalf Jung-7/+7
2020-06-26remove some compiler warningsStefan Lankes-3/+1
2020-06-26reorder crates to pass the format checkStefan Lankes-1/+1
2020-06-26minor changes to pass the format checkStefan Lankes-6/+2
2020-06-26revise RwLock, which is derived from the wasm implementationStefan Lankes-38/+143
- increasing the readability of `Condvar` - simplify the interface to the libos HermitCore
2020-06-19Remove old commented codeNathan West-2/+0
2020-06-19Fixed missing `mut`Nathan West-1/+1
2020-06-19Converted all platform-specific stdin/stdout/stderr implementations to io traitsNathan West-20/+17
2020-06-16Use `Ipv4Addr::from<[u8; 4]>` when possibleLzu Tao-8/+2
2020-06-15remove obsolete , to pass the format checkStefan Lankes-2/+2
2020-06-15add comment about the usage of ArcStefan Lankes-0/+3
2020-06-15use Ipv6Addr::from to build the IPv6 addressStefan Lankes-24/+2
2020-06-15Revert "simplify conversion to IpAddr::V6"Stefan Lankes-2/+18
This reverts commit d221ffc68e543f4a38efcc2bd34f52145f89003b.
2020-06-15Revert "changes to pass the format check"Stefan Lankes-4/+10
This reverts commit 9d596b50f15dfff47fa2272ee63cdc9aeb9307fa.
2020-06-15remove obsolete lineStefan Lankes-1/+0
2020-06-15changes to pass the format checkStefan Lankes-10/+4
2020-06-14simplify conversion to IpAddr::V6Stefan Lankes-18/+2
2020-06-14remove unused functionStefan Lankes-6/+0
2020-06-13add TcpListener support for HermitCoreStefan Lankes-46/+111
Add basic support of TcpListerner for HermitCore. In addition, revise TcpStream to support peer_addr.
2020-06-10Migrate to numeric associated constsLzu Tao-1/+1
2020-05-18Auto merge of #72289 - RalfJung:abort_internal, r=Mark-Simulacrumbors-3/+5
abort_internal is safe `sys::abort_internal` is stably exposed as a safe function. Forward that assumption "inwards" to the `sys` module by making the function itself safe, too. This corresponds to what https://github.com/rust-lang/rust/pull/72204 did for the intrinsic. We should probably wait until that lands because some of the intrinsic calls in this PR might then need adjustments.
2020-05-18minor changes to pass the format checkStefan Lankes-3/+1
2020-05-17use new interface to initialize CondvarStefan Lankes-4/+4
HermitCore introduce a new interface to intialize conditional variables. Consequently, minor changes are required to support this interface.
2020-05-17abort_internal is safeRalf Jung-3/+5
2020-05-06Rollup merge of #71591 - hermitcore:thread_create, r=hanna-kruppeDylan DPC-7/+6
use new interface to create threads on HermitCore - the new interface allows to define the stack size - increase the default stack size to 1 MByte
2020-04-27use nicer code style to define DEFAULT_MIN_STACK_SIZEStefan Lankes-1/+1
2020-04-26use new interface to create threads on HermitCoreStefan Lankes-7/+6
- the new interface allows to define the stack size
2020-04-26Update nameSteven Fackler-9/+9
2020-04-26Add Read/Write::can_read/write_vectoredSteven Fackler-0/+43
When working with an arbitrary reader or writer, code that uses vectored operations may end up being slower than code that copies into a single buffer when the underlying reader or writer doesn't actually support vectored operations. These new methods allow you to ask the reader or witer up front if vectored operations are efficiently supported. Currently, you have to use some heuristics to guess by e.g. checking if the read or write only accessed the first buffer. Hyper is one concrete example of a library that has to do this dynamically: https://github.com/hyperium/hyper/blob/0eaf304644a396895a4ce1f0146e596640bb666a/src/proto/h1/io.rs#L582-L594
2020-04-08Rollup merge of #70134 - hermitcore:osstrext, r=dtolnayDylan DPC-0/+53
add basic support of OsStrExt for HermitCore - this patch increases the compatibility to other operating systems - in principle `ffi.rs` is derived from `src/libstd/sys/unix/ext/ffi.rs`
2020-04-06Rollup merge of #70808 - hermitcore:tls, r=dtolnayMazdak Farrokhzad-44/+48
Simplify dtor registration for HermitCore by using a list of destructors The implementation is similar to the macOS version and doesn't depend on additional OS support
2020-04-06Rollup merge of #70553 - hermitcore:abi, r=dtolnayMazdak Farrokhzad-33/+3
move OS constants to platform crate to reduce platform specific constants move O_RDONLY etc. and the definition of thread priorities to hermit-abi
2020-04-05Simplify dtor registration for HermitCore by using a list of destructorsStefan Lankes-44/+48
The implementation is similiar to macOS solution doesn't depend on additional OS support
2020-04-05Stop importing integer modules in libstdLinus Färnstrand-1/+0
2020-04-04Merge branch 'master' into abiStefan Lankes-87/+156
2020-04-04Auto merge of #70136 - hermitcore:network_tcp, r=dtolnaybors-87/+156
add basic IP support in HermitCore - add initial version to support sockets - use TcpStream as test case - HermitCore uses smoltcp as IP stack for pure Rust applications - further functionalities (e.g. UDP support) will be added step by step - in principle, the current PR is a revision of #69404
2020-04-04Merge branch 'master' into abiStefan Lankes-16/+9
2020-04-03Delete unnecessary stub stack overflow handler for hermit.Vytautas Astrauskas-12/+0
2020-04-02Remove unnecessary intermediate pointer cast in Thread::new.Vytautas Astrauskas-1/+1
2020-04-01In Thread::new, add a comment that a panic could cause a memory leak.Vytautas Astrauskas-1/+1
2020-03-31Use Box::into_raw instead of ManuallyDrop in Thread::new.Vytautas Astrauskas-4/+4
2020-03-31Inline start_thread into its callers.Vytautas Astrauskas-3/+6
2020-03-31Fix double-free and undefined behaviour in libstd::syn::unix::Thread::new.Vytautas Astrauskas-6/+8
2020-03-30move the definition of thread priorities to hermit-abiStefan Lankes-24/+1
2020-03-30reorder imports to pass the format checkStefan Lankes-1/+1
2020-03-30minor changes to pass the format checkStefan Lankes-2/+1
2020-03-30move OS constants to platform crateStefan Lankes-8/+2
2020-03-21Rollup merge of #69955 - alexcrichton:stderr-infallible, r=sfacklerDylan DPC-3/+3
Fix abort-on-eprintln during process shutdown This commit fixes an issue where if `eprintln!` is used in a TLS destructor it can accidentally cause the process to abort. TLS destructors are executed after `main` returns on the main thread, and at this point we've also deinitialized global `Lazy` values like those which store the `Stderr` and `Stdout` internals. This means that despite handling TLS not being accessible in `eprintln!`, we will fail due to not being able to call `stderr()`. This means that we'll double-panic quickly because panicking also attempt to write to stderr. The fix here is to reimplement the global stderr handle to avoid the need for destruction. This avoids the need for `Lazy` as well as the hidden panic inside of the `stderr` function. Overall this should improve the robustness of printing errors and/or panics in weird situations, since the `stderr` accessor should be infallible in more situations.