about summary refs log tree commit diff
path: root/library/std/src/sys_common/mod.rs
AgeCommit message (Collapse)AuthorLines
2023-02-24add support of RustyHermit's BSD socket layerStefan Lankes-1/+0
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.
2022-12-29std: unify id-based thread parking implementationsjoboet-1/+1
2022-12-28Rollup merge of #104402 - joboet:sync_remutex, r=m-ou-seMatthias Krüger-1/+0
Move `ReentrantMutex` to `std::sync` If I understand #84187 correctly, `sys_common` should not contain platform-independent code, even if it is private.
2022-12-01Auto merge of #104160 - Ayush1325:windows-args, r=m-ou-sebors-0/+1
Extract WStrUnits to sys_common::wstr This commit extracts WStrUnits from sys::windows::args to sys_common::wstr. This allows using the same structure for other targets which use wtf8 (example UEFI). This was originally a part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-28Extract WStrUnits to sys_common::wstrAyush Singh-0/+1
This commit extracts WStrUnits from sys::windows::args to sys_common::wstr. This allows using the same structure for other targets which use wtf8 (example UEFI). This was originally a part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-14std: move `ReentrantMutex` to `sync`joboet-1/+0
2022-11-06std: remove lock wrappers in `sys_common`joboet-3/+0
2022-10-13Auto merge of #102655 - joboet:windows_tls_opt, r=ChrisDentonbors-1/+8
Optimize TLS on Windows This implements the suggestion in the current TLS code to embed the linked list of destructors in the `StaticKey` structure to save allocations. Additionally, locking is avoided when no destructor needs to be run. By using one Windows-provided `Once` per key instead of a global lock, locking is more finely-grained (this unblocks #100579).
2022-10-08std: optimize TLS on Windowsjoboet-1/+8
2022-10-07std: use futex in `Once`joboet-0/+1
2022-06-03Lazily allocate+initialize locks.Mara Bos-0/+1
2021-11-10Use `target_family = "wasm"`Alex Crichton-2/+1
2021-11-10std: Get the standard library compiling for wasm64Alex Crichton-0/+1
This commit goes through and updates various `#[cfg]` as appropriate to get the wasm64-unknown-unknown target behaving similarly to the wasm32-unknown-unknown target. Most of this is just updating various conditions for `target_arch = "wasm32"` to also account for `target_arch = "wasm64"` where appropriate. This commit also lists `wasm64` as an allow-listed architecture to not have the `restricted_std` feature enabled, enabling experimentation with `-Z build-std` externally. The main goal of this commit is to enable playing around with `wasm64-unknown-unknown` externally via `-Z build-std` in a way that's similar to the `wasm32-unknown-unknown` target. These targets are effectively the same and only differ in their pointer size, but wasm64 is much newer and has much less ecosystem/library support so it'll still take time to get wasm64 fully-fledged.
2021-09-16Merge sys_common::rt into rtbjorn3-2/+0
2021-07-03Move `os_str_bytes` to `sys::unix` and reuse it on other platforms.Christiaan Dirkx-4/+0
2021-06-21Merge `sys_common::bytestring` into `os_str_bytes`Christiaan Dirkx-1/+0
2021-05-20Rollup merge of #85275 - CDirkx:memchr, r=m-ou-seGuillaume Gomez-0/+1
Move `std::memchr` to `sys_common` `std::memchr` is a thin abstraction over the different `memchr` implementations in `sys`, along with documentation and tests. The module is only used internally by `std`, nothing is exported externally. Code like this is exactly what the `sys_common` module is for, so this PR moves it there.
2021-05-19Replace `sys_common::util::dumb_print` with `rterr!`Christiaan Dirkx-1/+0
2021-05-14Move `std::memchr` to `sys_common`Christiaan Dirkx-0/+1
2021-04-25Auto merge of #84115 - CDirkx:rt, r=m-ou-sebors-53/+2
Rework `init` and `cleanup` This PR reworks the code in `std` that runs before and after `main` and centralizes this code respectively in the functions `init` and `cleanup` in both `sys_common` and `sys`. This makes is easy to see what code is executed during initialization and cleanup on each platform just by looking at e.g. `sys::windows::init`. Full list of changes: - new module `rt` in `sys_common` to contain `init` and `cleanup` and the runtime macros. - `at_exit` and the mechanism to register exit handlers has been completely removed. In practice this was only used for closing sockets on windows and flushing stdout, which have been moved to `cleanup`. - <s>On windows `alloc` and `net` initialization is now done in `init`, this saves a runtime check in every allocation and network use.</s>
2021-04-22Rework `at_exit` to `cleanup`Christiaan Dirkx-53/+2
2021-04-22Move `sys_common::poison` to `sync::poison`Christiaan Dirkx-1/+0
2021-04-14Update documentationChristiaan Dirkx-3/+5
2021-04-14Move `std::sys_common::alloc` to `std::sys::common`Christiaan Dirkx-1/+0
2020-11-22Drop support for cloudabi targetsLzu Tao-2/+1
2020-09-27Move thread parker to sys_common.Mara Bos-0/+1
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-5/+3
Also doing fmt inplace as requested.
2020-07-27mv std libs to library/mark-0/+148