Skip to content

Commit

Permalink
Fix build, add missed macros
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Jul 2, 2024
1 parent 3c2f3ca commit 44e2b36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions include/zenoh-pico/api/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
z_owned_slice_t : z_slice_loan, \
z_owned_bytes_t : z_bytes_loan, \
z_owned_encoding_t : z_encoding_loan, \
z_owned_task_t : z_task_loan, \
z_owned_mutex_t : z_mutex_loan, \
z_owned_condvar_t : z_condvar_loan, \
z_owned_fifo_handler_query_t : z_fifo_handler_query_loan, \
Expand All @@ -78,6 +79,7 @@
z_owned_query_t : z_query_loan_mut, \
z_owned_slice_t : z_slice_loan_mut, \
z_owned_bytes_t : z_bytes_loan_mut, \
z_owned_task_t : z_task_loan_mut, \
z_owned_mutex_t : z_mutex_loan_mut, \
z_owned_condvar_t : z_condvar_loan_mut, \
z_owned_reply_err_t : z_reply_err_loan_mut \
Expand Down Expand Up @@ -109,6 +111,7 @@
z_owned_closure_reply_t * : z_closure_reply_drop, \
z_owned_closure_hello_t * : z_closure_hello_drop, \
z_owned_closure_zid_t * : z_closure_zid_drop, \
z_owned_task_t *: z_task_drop, \
z_owned_mutex_t *: z_mutex_drop, \
z_owned_condvar_t *: z_condvar_drop, \
z_owned_fifo_handler_query_t * : z_fifo_handler_query_drop, \
Expand Down Expand Up @@ -214,6 +217,7 @@
z_owned_slice_t : z_slice_move, \
z_owned_bytes_t : z_bytes_move, \
z_owned_encoding_t : z_encoding_move, \
z_owned_task_t : z_task_move, \
z_owned_mutex_t : z_mutex_move, \
z_owned_condvar_t : z_condvar_move, \
z_owned_ring_handler_query_t : z_ring_handler_query_move, \
Expand Down Expand Up @@ -326,6 +330,7 @@ inline const z_loaned_query_t* z_loan(const z_owned_query_t& x) { return z_query
inline const z_loaned_slice_t* z_loan(const z_owned_slice_t& x) { return z_slice_loan(&x); }
inline const z_loaned_bytes_t* z_loan(const z_owned_bytes_t& x) { return z_bytes_loan(&x); }
inline const z_loaned_encoding_t* z_loan(const z_owned_encoding_t& x) { return z_encoding_loan(&x); }
inline const z_loaned_task_t* z_loan(const z_owned_task_t& x) { return z_task_loan(&x); }
inline const z_loaned_mutex_t* z_loan(const z_owned_mutex_t& x) { return z_mutex_loan(&x); }
inline const z_loaned_condvar_t* z_loan(const z_owned_condvar_t& x) { return z_condvar_loan(&x); }
inline const z_loaned_reply_err_t* z_loan(const z_owned_reply_err_t& x) { return z_reply_err_loan(&x); }
Expand All @@ -347,6 +352,7 @@ inline z_loaned_query_t* z_loan_mut(z_owned_query_t& x) { return z_query_loan_mu
inline z_loaned_slice_t* z_loan_mut(z_owned_slice_t& x) { return z_slice_loan_mut(&x); }
inline z_loaned_bytes_t* z_loan_mut(z_owned_bytes_t& x) { return z_bytes_loan_mut(&x); }
inline z_loaned_encoding_t* z_loan_mut(z_owned_encoding_t& x) { return z_encoding_loan_mut(&x); }
inline z_loaned_task_t* z_loan_mut(z_owned_task_t& x) { return z_task_loan_mut(&x); }
inline z_loaned_mutex_t* z_loan_mut(z_owned_mutex_t& x) { return z_mutex_loan_mut(&x); }
inline z_loaned_condvar_t* z_loan_mut(z_owned_condvar_t& x) { return z_condvar_loan_mut(&x); }
inline z_loaned_reply_err_t* z_loan_mut(z_owned_reply_err_t& x) { return z_reply_err_loan_mut(&x); }
Expand All @@ -367,6 +373,7 @@ inline void z_drop(z_owned_sample_t* v) { z_sample_drop(v); }
inline void z_drop(z_owned_query_t* v) { z_query_drop(v); }
inline void z_drop(z_owned_bytes_t* v) { z_bytes_drop(v); }
inline void z_drop(z_owned_encoding_t* v) { z_encoding_drop(v); }
inline void z_drop(z_owned_task_t* v) { z_task_drop(v); }
inline void z_drop(z_owned_mutex_t* v) { z_mutex_drop(v); }
inline void z_drop(z_owned_condvar_t* v) { z_condvar_drop(v); }
inline void z_drop(z_owned_reply_err_t* v) { z_reply_err_drop(v); }
Expand Down
2 changes: 1 addition & 1 deletion src/system/arduino/esp32/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ int8_t _z_condvar_free(_z_condvar_t *cv) { return pthread_cond_destroy(cv); }

int8_t _z_condvar_signal(_z_condvar_t *cv) { return pthread_cond_signal(cv); }

int8_t _z_condvar_wait(_z_condvar_t *cv, z_mutex_t *m) { return pthread_cond_wait(cv, m); }
int8_t _z_condvar_wait(_z_condvar_t *cv, _z_mutex_t *m) { return pthread_cond_wait(cv, m); }
#endif // Z_FEATURE_MULTI_THREAD == 1

/*------------------ Sleep ------------------*/
Expand Down

0 comments on commit 44e2b36

Please sign in to comment.