diff --git a/include/zenoh-pico/api/macros.h b/include/zenoh-pico/api/macros.h index 0f22d1972..2540bbd4c 100644 --- a/include/zenoh-pico/api/macros.h +++ b/include/zenoh-pico/api/macros.h @@ -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, \ @@ -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 \ @@ -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, \ @@ -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, \ @@ -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); } @@ -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); } @@ -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); } diff --git a/src/system/arduino/esp32/system.c b/src/system/arduino/esp32/system.c index e9137e8c9..9d07e9d66 100644 --- a/src/system/arduino/esp32/system.c +++ b/src/system/arduino/esp32/system.c @@ -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 ------------------*/