-
Notifications
You must be signed in to change notification settings - Fork 85
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
Make all sync mechanisms public #309
Conversation
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.
Cppcheck (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
If we want them public, can it at least be restricted to |
I agree with @p-avital . Let's expose them public but with the |
0e9b446
to
474e9b6
Compare
But wasn't Zenoh C supposed to eventually or already expose at least some of these? Also it would be weird to have some of them in
|
I think we need a table checking what is supported and what not. The real API I'm quite confident restricting to |
Agreed for |
6df2e19
to
ef5288e
Compare
typedef void *_z_task_attr_t; // Not used in ESP32 | ||
typedef pthread_mutex_t _z_mutex_t; | ||
typedef pthread_cond_t _z_condvar_t; | ||
typedef TaskHandle_t z_task_t; |
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.
I believe the type should be called zp_task_t
.
typedef pthread_mutex_t _z_mutex_t; | ||
typedef pthread_cond_t _z_condvar_t; | ||
typedef TaskHandle_t z_task_t; | ||
typedef void *z_task_attr_t; // Not used in ESP32 |
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.
I believe the type should be called zp_task_attr_t
.
typedef void *_z_condvar_t; | ||
typedef void *z_task_t; | ||
typedef void *z_task_attr_t; | ||
typedef void *z_mutex_t; |
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.
It seems that z_mutex_t
and z_condvar_t
are not available in zenoh-c
.
Before merging, can you please confirm that:
are all supported in |
None of these types are currently supported in zenoh-c |
Ok, then let's stick to |
6b9c280
to
bfecbb0
Compare
a59b5e1
to
b57ae58
Compare
Some system-abstracted functions where public, like
z_time
andz_clock
while the multi-thread onesz_task
,z_mutex
andz_condvar
were not. This PR fixes this inconsistency that was noted in #271.Note that 2 systems are not fully covered (functions and types are stubs):
Arduino/opencr
has no support for task, mutex and condvarFreeRTOS
has no support for condvar