about summary refs log tree commit diff
path: root/library/std/src/sys/unsupported
AgeCommit message (Collapse)AuthorLines
2021-03-21Use io::Error::new_const everywhere to avoid allocations.Mara Bos-3/+3
2020-11-14Disambiguate symlink argument namesDavid Tolnay-1/+1
2020-10-14Rollup merge of #77722 - fusion-engineering-forks:safe-unsupported-locks, ↵Yuki Okushi-37/+32
r=Mark-Simulacrum Remove unsafety from sys/unsupported and add deny(unsafe_op_in_unsafe_fn). Replacing `UnsafeCell`s by a `Cell`s simplifies things and makes the mutex and rwlock implementations safe. Other than that, only unsafety in strlen() contained unsafe code. @rustbot modify labels: +F-unsafe-block-in-unsafe-fn +C-cleanup
2020-10-13Add note about using cells in the locks on the 'unsupported' platform.Mara Bos-0/+2
2020-10-09Assert state in sys/unsupported's RwLock::write_unlock.Mara Bos-1/+1
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-10-08Apply deny(unsafe_op_in_unsafe_fn) to all of sys/unsupported.Mara Bos-9/+10
2020-10-08Remove unsafety from unsupported/rwlosck.rs by using a Cell.Mara Bos-18/+16
Replacing the UnsafeCell by a Cell makes it all safe.
2020-10-08Remove unsafety from unsupported/mutex.rs by using a Cell.Mara Bos-14/+8
Replacing the UnsafeCell by a Cell simplifies things and makes it all safe.
2020-10-08Remove unnecessary rustc_const_stable attributes.Mara Bos-1/+0
2020-10-04Auto merge of #77380 - fusion-engineering-forks:unbox-the-mutex, r=dtolnaybors-0/+4
Unbox mutexes and condvars on some platforms Both mutexes and condition variables contained a Box containing the actual os-specific object. This was done because moving these objects may cause undefined behaviour on some platforms. However, this is not needed on Windows[1], Wasm[2], cloudabi[2], and 'unsupported'[3], were the box was only needlessly making them less efficient. This change gets rid of the box on those platforms. On those platforms, `Condvar` can no longer verify it is only used with one `Mutex`, as mutexes no longer have a stable address. This was addressed and considered acceptable in #76932. [1]\: https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-initializesrwlock [2]\: These are just a single atomic integer together with futex wait/wake calls/instructions. [3]\: The `unsupported` platform doesn't support multiple threads at all.
2020-10-02No longer put condvars on the 'unsupported' platform in a box.Mara Bos-1/+1
These condvars are unsupported and implemented as a ZST, so can be moved without problems.
2020-10-02Make it possible to have unboxed condvars on specific platforms.Mara Bos-0/+2
This commit keeps all condvars boxed on all platforms, but makes it trivial to remove the box on some platforms later.
2020-10-02No longer put mutexes on the 'unsupported' platform in a box.Mara Bos-1/+1
These mutexes are just a bool (in a cell), so can be moved without problems.
2020-10-02Make it possible to have unboxed mutexes on specific platforms.Mara Bos-0/+2
This commit keeps all mutexes boxed on all platforms, but makes it trivial to remove the box on some platforms later.
2020-09-26Add accessors to Command.Eric Huss-1/+38
2020-09-15Consolidate wasi::process and unsupported::processEric Huss-6/+2
2020-09-15Consolidate byte-identical modules.Eric Huss-19/+1
2020-08-21Make raw standard stream constructors constTomasz Miąsko-3/+3
2020-08-21Remove result type from raw standard streams constructorsTomasz Miąsko-6/+6
Raw standard streams constructors are infallible. Remove unnecessary result type.
2020-07-27mv std libs to library/mark-0/+1553