| Age | Commit message (Collapse) | Author | Lines |
|
size_of
|
|
|
|
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
feat(std): Stabilize 'os_str_bytes' feature
Closes #111544
|
|
|
|
|
|
`std::sys::solid::is_interrupted`
|
|
|
|
fix(sys/hermit): add is_interrupted
https://github.com/rust-lang/rust/pull/115228 broke compilation for Hermit by not adding a Hermit implementation of is_interrupted.
|
|
fix(sys/hermit): remove obsolete network initialization
This function does not exist as of hermit-sys 0.4.1 ([`e38f246`]). Once std does not call this function, we can remove it entirely.
CC: `@stlankes`
[`e38f246`]: https://github.com/hermitcore/hermit-rs/commit/e38f246e046c3ad50bd2f5e33d8d810d33891cbd#diff-a9b7fa816defab285f0d4fe69d4df4a0cbbcf1c89913000df3273aded949f257R10
|
|
|
|
|
|
This allows `SOCKET` to be `usize` internally
|
|
|
|
Add ability to spawn Windows process with Proc Thread Attributes | Take 2
This is the second attempt to merge pull request #88193 into the standard library.
This PR implements the ability to add arbitrary attributes to a command on Windows targets using a new `raw_attribute` method on the [`CommandExt`](https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html) trait.
`@TyPR124` and my main motivation behind adding this feature is to enable the support of pseudo terminals in the std library, but there are many more applications. A good starting point to get into this topic is to head over to the [`Win32 API documentation`](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-updateprocthreadattribute).
|
|
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
|
|
This function does not exist as of hermit-sys 0.4.1 [1].
Once std does not call this function, we can remove it entirely.
[1]: https://github.com/hermitcore/hermit-rs/commit/e38f246e046c3ad50bd2f5e33d8d810d33891cbd#diff-a9b7fa816defab285f0d4fe69d4df4a0cbbcf1c89913000df3273aded949f257R10
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
|
|
C11 `aligned_alloc` requires that the size be a multiple of the
alignment. This is enforced in the wasi-libc emmalloc implementation,
which always returns NULL if the size is not a multiple.
(The default `MALLOC_IMPL=dlmalloc` does not currently check this.)
|
|
Add a new helper to avoid calling io::Error::kind
On `cfg(unix)`, `Error::kind` emits an enormous jump table that LLVM seems unable to optimize out. I don't really understand why, but see for yourself: https://godbolt.org/z/17hY496KG
This change lets us check for `ErrorKind::Interrupted` without going through a big match. I've checked the codegen locally, and it has the desired effect on the codegen for `BufReader::read_exact`.
|
|
|
|
This implements the ability to add arbitrary attributes to a command on Windows targets using a new `raw_attribute` method on the [`CommandExt`](https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html) trait. Setting these attributes provides extended configuration options for Windows processes.
Co-authored-by: Tyler Ruckinger <t.ruckinger@gmail.com>
|
|
solid-rs:patch/kmc-solid/import-poison-error-in-os, r=cuviper
kmc-solid: Import `std::sync::PoisonError` in `std::sys::solid::os`
Follow-up to #114968. Fixes a missing import in [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets.
```
error[E0433]: failed to resolve: use of undeclared type `PoisonError`
C:\Users\xxxxx\.rustup\toolchains\nightly-2023-08-23-x86_64-pc-windows-gnu\lib\rustlib\src\rust\library\std\src\sys\solid\os.rs(85,36)
|
85 | ENV_LOCK.read().unwrap_or_else(PoisonError::into_inner)
| ^^^^^^^^^^^ use of undeclared type `PoisonError`
|
```
|
|
|
|
|
|
|
|
|
|
Fix a pthread_t handle leak #114610
https://github.com/rust-lang/rust/issues/114610
Ran the tests as described in https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/wasm32-wasi-preview1-threads.md?plain=1#L125
|
|
|
|
Move tests into a module as demanded by tidy.
|
|
|
|
Worsify formatting as required by rustfmt.
|
|
|
|
This is a pretty basic test but should spot any other platforms which
are `#[cfg(unix)]` but not Unix and where the wait status
representation is wrong. (And any actual Unix platforms where it's
not as expected, but I don't think they exist.)
|
|
Fixes #114593
Needs FCP due to behavioural changes.
|
|
Add support for Condvar, Mutex, and RWLock. These are all backed by the
ticktimer server.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Add an implementation of thread local storage. This uses a container
that is pointed to by the otherwise-unsed `$tp` register. This container
is allocated on-demand, so threads that use no TLS will not allocate
this extra memory.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Add initial support for threads on Xous. This includes thread creation
and joining.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Add support for determining the current time. This connects to the
ticktimer server in order to get the system uptime.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Add support for stdout. This enables basic console printing via
`println!()`. Output is written to the log server.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Basic alloc support on Xous is supported by the `dlmalloc` crate. This
necessitates bumping the dlmalloc version to 0.2.4.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Add the basics to get the operating system running, including how to
exit the operating system.
Since Xous has no libc, there is no default entrypoint. Add a `_start`
entrypoint to the system-specific os module.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Add the `xous` target to libstd. Currently this defers everything to the
`unsupported` target.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
Fix UB in `std::sys::os::getenv()`
Fixes #114949.
Reduced the loops to 1k iterations (100k was taking way too long), Miri no longer shows any UB.
`@rustbot` label +A-process +C-bug +I-unsound +O-unix
|
|
|
|
|
|
The maximum length the thread name can have is `_NTO_THREAD_NAME_MAX`
|
|
|
|
|
|
Fix pthread_attr_union layout on Wasi
Fixes https://github.com/rust-lang/rust/issues/114608
Ran the tests as described in https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/wasm32-wasi-preview1-threads.md?plain=1#L125
|
|
std: add some missing repr(transparent)
For some types we don't want to stably guarantee this, so hide the `repr` from rustdoc. This nice approach was suggested by `@thomcc.`
|