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

_Z_OWNED_FUNCTIONS_SYSTEM_IMPL macro is dummy #579

Closed
milyin opened this issue Aug 7, 2024 · 2 comments
Closed

_Z_OWNED_FUNCTIONS_SYSTEM_IMPL macro is dummy #579

milyin opened this issue Aug 7, 2024 · 2 comments
Assignees
Labels
release Part of the next release

Comments

@milyin
Copy link
Contributor

milyin commented Aug 7, 2024

Describe the release item

This macro implements common functions like z_check, z_null etc. But as this macro is used on structure with _val field of unknown (platform-dependent) type, like _z_task_t which is defined differently for each platform, this macro just provides empy implementation for these functions.
This makes our API incorrect. We guarantee that z_drop after z_null is safe, as well as double z_drop. But this is not the case for this implementation.

See also discussion in eclipse-zenoh/zenoh-c#492

@milyin milyin added the release Part of the next release label Aug 7, 2024
@sashacmc
Copy link
Member

sashacmc commented Aug 8, 2024

@milyin please assign it to me

@milyin
Copy link
Contributor Author

milyin commented Aug 8, 2024

The proposed solution is just don't support double drop for these types. This is necessary for C++ wrapper only, but these types are not supposed to be used in Zenoh C++ - the C++ have it's own support for these primitives (thread, mutex, etc).

The only thing to do then is just to remove the dummy functions z_null / z_check for these types. This will be the signal that these types are specific and doesn't have "gravestone" state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Part of the next release
Projects
Status: Done
Development

No branches or pull requests

2 participants