Skip to content
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

Adopted shm api #405

Merged
merged 59 commits into from
Jun 6, 2024
Merged

Conversation

yellowhatter
Copy link
Contributor

No description provided.

Conflicts:
	include/zenoh_commons.h
	include/zenoh_macros.h
Conflicts:
	include/zenoh_commons.h
	include/zenoh_macros.h
- C Provider and Client API tests
Conflicts:
	include/zenoh_commons.h
	include/zenoh_macros.h
- shm to payload API integration
- examples
- some improvements
Conflicts:
	src/payload.rs
	src/session.rs
- small fixes in tests
Conflicts:
	include/zenoh_commons.h
	src/payload.rs

/// Mutably borrows ZShm slice
#[no_mangle]
pub extern "C" fn z_shm_loan_mut(this: &mut z_owned_shm_t) -> &mut z_loaned_shm_t {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between these 2 methods? can we have just one loan_mut, that is allowed to return null ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't catch your question, sorry

Copy link
Contributor

@DenisBiryukov91 DenisBiryukov91 May 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I did not see the difference in return value. The question should likely be what is the difference between &mut z_loan_shm_mut_t and &mut z_loaned_shm_mut_t, I believe the user would expect that the first one would allow to modify zsh slice as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. The C API follows this schema from Rust API:
SHM Payload API drawio

@yellowhatter
Copy link
Contributor Author

@DenisBiryukov91 @milyin I think we can merge

- move shm types to zenoh_opaque.h
@DenisBiryukov91
Copy link
Contributor

Looks good for me.

Conflicts:
	build-resources/opaque-types/src/lib.rs
	splitguide.yaml
NOTICE.md Outdated Show resolved Hide resolved
examples/z_get_shm.c Outdated Show resolved Hide resolved
Conflicts:
	Cargo.lock
	build-resources/opaque-types/Cargo.lock
	build-resources/opaque-types/Cargo.toml
	build-resources/opaque-types/src/lib.rs
	src/get.rs
@milyin milyin merged commit 390595b into eclipse-zenoh:dev/1.0.0 Jun 6, 2024
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants