-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 5 pull requests #131288
Rollup of 5 pull requests #131288
Conversation
Refactor ``return_read_bytes_and_count`` and ``return_written_byte_count_or_error`` Fixes rust-lang#3904 This PR - separate the error logic from ``return_read_bytes_and_count`` and ``return_written_byte_count_or_error`` into a helper function ``set_last_error_and_return``.
Make returning io errors more uniform and convenient
This PR replaces the `LazyBox` wrapper used to allocate the pthread primitives with `OnceBox`, which has a more familiar API mirroring that of `OnceLock`. This cleans up the code in preparation for larger changes like rust-lang#128184 (from which this PR was split) and allows some neat optimizations, like avoid an acquire-load of the allocation pointer in `Mutex::unlock`, where the initialization of the allocation must have already been observed. Additionally, I've gotten rid of the TEEOS `Condvar` code, it's just a duplicate of the pthread one anyway and I didn't want to repeat myself.
This test demonstrates the need to synchronize the clock of the thread waking up from an epoll_wait from the thread that issued the epoll awake event.
A couple of instructions were left over from an earlier rebase it would seem. They don't impact the logic but the ready_list type is about to change in the next commit. Rather than modify one of these lines in the commit that changes ready_list, only to have these lines removed later on, remove them now. They don't impact the tests results.
This adds a VClock to the epoll implementation's ready_list and has this VClock synced from the thread that updates an event in the ready_list and then has the VClocks of any threads being made runnable again, out of the calls to epoll_wait, synced from it.
A simplification that doesn't impact the epoll implementation's logic. It is not necessary to clone the ready_list before reading its `is_empty` state. This avoids the clone step but more importantly avoids the invisible drop step of the clone.
…li-obk Add vector clock to epoll ready lists Replaces rust-lang#3928 Fixes rust-lang#3911
Automatic Rustup
Implement LLVM x86 gfni intrinsics
Signed-off-by: onur-ozkan <[email protected]>
…D_MUTEX_INITIALIZER
…lfJung pthread mutex: better error in reentrant-locking-UB Also test reentrant locking of PTHREAD_MUTEX_INITIALIZER
Prefer refutable slice patterns over len check + index op Just something I noticed while reviewing other PRs We do it for shim arguments almost everywhere, but when the size is not statically known, we didn't use the helpers as they rely on array ops. But we can avoid a len check followed by several index ops by just using a refutable slice pattern with `let else`. The pattern is so common, it seems almost worth a dedicated macro
…lit-at-mut, r=RalfJung Stabilize `const_slice_split_at_mut` and `const_slice_first_last_chunk` Stabilizes rust-lang#101804 and the remainder of rust-lang#111774. FCP proposed in the tracking issue. Requires rust-lang#130403 (or it would need a rustc_allow_const_fn_unstable for it) Stabilized const API: ```rust // slice impl [T] { pub const fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]); pub const fn split_at_mut_unchecked(&mut self, mid: usize) -> (&mut [T], &mut [T]); pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut [T], &mut [T])>; pub const fn first_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>; pub const fn last_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>; pub const fn split_first_chunk_mut<const N: usize>(&mut self) -> Option<(&mut [T; N], &mut [T])>; pub const fn split_last_chunk_mut<const N: usize>(&mut self) -> Option<(&mut [T; N], &mut [T])>; } ``` Closes rust-lang#101804 Closes rust-lang#111774 cc `@RalfJung`
std: replace `LazyBox` with `OnceBox` This PR replaces the `LazyBox` wrapper used to allocate the pthread primitives with `OnceBox`, which has a more familiar API mirroring that of `OnceLock`. This cleans up the code in preparation for larger changes like rust-lang#128184 (from which this PR was split) and allows some neat optimizations, like avoid an acquire-load of the allocation pointer in `Mutex::unlock`, where the initialization of the allocation must have already been observed. Additionally, I've gotten rid of the TEEOS `Condvar` code, it's just a duplicate of the pthread one anyway and I didn't want to repeat myself.
…mdev move f16/f128 const fn under f16/f128 feature gate The `*_const` features were added to work around rust-lang#129656, which should not be needed any more.
…Kobzol remove outdated contribution direction
Miri subtree update r? `@ghost`
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 5a4ee43c38 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (f559d61): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary -3.2%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary -2.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 774.178s -> 773.78s (-0.05%) |
Successful merges:
const_slice_split_at_mut
andconst_slice_first_last_chunk
#130428 (Stabilizeconst_slice_split_at_mut
andconst_slice_first_last_chunk
)LazyBox
withOnceBox
#131094 (std: replaceLazyBox
withOnceBox
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup