-
Notifications
You must be signed in to change notification settings - Fork 116
[#1331] make cleanupstate zerocopysend #1332
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
[#1331] make cleanupstate zerocopysend #1332
Conversation
32feb9d to
59b9cd3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR makes CleanupState zero-copy sendable by implementing the ZeroCopySend trait, as required for zero-copy inter-process communication. The changes involve type modifications and field reordering to ensure proper memory layout and platform-independent representation.
Changes:
- Modified
CleanupStateto implementZeroCopySendby adding#[repr(C)]and changing field types fromusizetou64 - Reordered fields in
Channel,SafelyOverflowingIndexQueue, andIndexQueuestructures for optimized memory layout - Updated changelog to reflect the implementation of
ZeroCopySendforCleanupState
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| iceoryx2/src/node/mod.rs | Added ZeroCopySend derive and #[repr(C)] to CleanupState, changed field types from usize to u64 |
| iceoryx2-cal/src/zero_copy_connection/common.rs | Reordered fields in Channel struct, moving state field before queues |
| iceoryx2-bb/lock-free/src/spsc/safely_overflowing_index_queue.rs | Reordered fields in SafelyOverflowingIndexQueue for improved alignment |
| iceoryx2-bb/lock-free/src/spsc/index_queue.rs | Reordered fields in IndexQueue for improved alignment |
| doc/release-notes/iceoryx2-unreleased.md | Added changelog entry noting CleanupState implements ZeroCopySend |
Comments suppressed due to low confidence (1)
doc/release-notes/iceoryx2-unreleased.md:53
- The changelog entry should be moved from the "Refactoring" section to the "API Breaking Changes" section, as the type change from
usizetou64inCleanupStatefields is a breaking API change. This affects: (1) Rust code that constructsCleanupStatewith struct literals, (2) Python FFI bindings that expose these fields asusize, and (3) any code that pattern matches onCleanupState. Additionally, the changelog should mention the binary layout changes in internal data structures (Channel,IndexQueue,SafelyOverflowingIndexQueue) which break compatibility with existing shared memory segments.
[#1300](https://github.com/eclipse-iceoryx/iceoryx2/issues/1300)
* Replace `lazy_static` dependency with `LazyLock` from `std` in `std` builds or
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1332 +/- ##
==========================================
- Coverage 77.95% 77.92% -0.04%
==========================================
Files 406 406
Lines 38941 38941
Branches 1256 1256
==========================================
- Hits 30356 30343 -13
- Misses 7552 7565 +13
Partials 1033 1033
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Notes for Reviewer
Pre-Review Checklist for the PR Author
Convert to draft)iox2-123-introduce-posix-ipc-example)[#123] Add posix ipc example)task-list-completed)PR Reviewer Reminders
References
Closes #1331