about summary refs log tree commit diff
path: root/library/std/src/sys/sgx/mod.rs
AgeCommit message (Collapse)AuthorLines
2022-12-29std: unify id-based thread parking implementationsjoboet-1/+1
2022-12-10Rollup merge of #98391 - joboet:sgx_parker, r=m-ou-seMatthias Krüger-0/+1
Reimplement std's thread parker on top of events on SGX Mutex and Condvar are being replaced by more efficient implementations, which need thread parking themselves (see #93740). Therefore, the generic `Parker` needs to be replaced on all platforms where the new lock implementation will be used. SGX enclaves have a per-thread event state, which allows waiting for and setting specific bits. This is already used by the current mutex implementation. The thread parker can however be much more efficient, as it only needs to store the `TCS` address of one thread. This address is stored in a state variable, which can also be set to indicate the thread was already notified. `park_timeout` does not guard against spurious wakeups like the current condition variable does. This is allowed by the API of `Parker`, and I think it is better to let users handle these wakeups themselves as the guarding is quite expensive and might not be necessary. `@jethrogb` as you wrote the initial SGX support for `std`, I assume you are the target maintainer? Could you help me test this, please? Lacking a x86_64 chip, I can't run SGX.
2022-11-21dont attempt strict provenance in SGXRalf Jung-0/+1
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-06-22std: rewrite SGX thread parkerjoboet-0/+1
2022-04-14library: Remove definitions and reexports of `strlen` from libstdVadim Petrochenkov-10/+0
2022-03-22Move std::sys::{mutex, condvar, rwlock} to std::sys::locks.Mara Bos-3/+10
2022-02-04Hide Repr details from io::Error, and rework `io::Error::new_const`.Thom Chiovoloni-3/+3
2021-07-03Move `os_str_bytes` to `sys::unix` and reuse it on other platforms.Christiaan Dirkx-2/+2
2021-06-15Rename ErrorKind::Unknown to Uncategorized.Mara Bos-3/+3
2021-06-15Redefine `ErrorKind::Other` and stop using it in std.Mara Bos-3/+3
2021-05-03Move `std::sys::sgx::ext` to `std::os::fortanix_sgx`Christiaan Dirkx-1/+0
2021-04-30Auto merge of #84522 - CDirkx:cmath, r=yaahcbors-0/+1
Reuse `sys::unix::cmath` on other platforms Reuse `sys::unix::cmath` on all non-`windows` platforms. `unix` is chosen as the canonical location instead of `unsupported` or `common` because `unsupported` doesn't make sense semantically and `common` is reserved for code that is supported on all platforms. Also `unix` is already the home of some non-`windows` code that is technically not exclusive to `unix` like `unix::path`.
2021-04-28Reuse `unix::cmath`Christiaan Dirkx-0/+1
2021-04-22Document that `init` and `cleanup` are not guaranteed to runChristiaan Dirkx-0/+2
2021-04-22Move most init to `sys::init`Christiaan Dirkx-2/+5
2021-04-22Rework `at_exit` to `cleanup`Christiaan Dirkx-2/+5
2021-04-20Replace `Void` with never typeChristiaan Dirkx-5/+0
2021-04-18Rename `NotSupported` to `Unsupported`Christiaan Dirkx-1/+1
2021-04-18Use `NotSupported` in more placesChristiaan Dirkx-1/+1
2021-03-21Use io::Error::new_const everywhere to avoid allocations.Mara Bos-3/+3
2020-10-08`#[deny(unsafe_op_in_unsafe_fn)]` in sys/sgxCaduser2020-2/+3
Run `./x.py` fmt Add reference link Fix reference link Apply review suggestions.
2020-09-15Consolidate byte-identical modules.Eric Huss-0/+4
2020-07-27mv std libs to library/mark-0/+162