diff --git a/include/zenoh-pico/system/platform_common.h b/include/zenoh-pico/system/platform_common.h index c2b3b65a2..ae467dc6b 100644 --- a/include/zenoh-pico/system/platform_common.h +++ b/include/zenoh-pico/system/platform_common.h @@ -117,7 +117,7 @@ z_result_t _z_task_cancel(_z_task_t *task); void _z_task_free(_z_task_t **task); z_result_t z_task_init(z_owned_task_t *task, z_task_attr_t *attr, void *(*fun)(void *), void *arg); -z_result_t z_task_join(z_owned_task_t *task); +z_result_t z_task_join(z_moved_task_t *task); /*------------------ Mutex ------------------*/ _Z_OWNED_TYPE_VALUE(_z_mutex_t, mutex) diff --git a/src/system/platform_common.c b/src/system/platform_common.c index 2270eb390..01362903c 100644 --- a/src/system/platform_common.c +++ b/src/system/platform_common.c @@ -27,8 +27,8 @@ z_result_t z_task_init(z_owned_task_t *task, z_task_attr_t *attr, void *(*fun)(v return _z_task_init(&task->_val, attr, fun, arg); } -z_result_t z_task_join(z_owned_task_t *task) { - _z_task_t *ptr = &task->_val; +z_result_t z_task_join(z_moved_task_t *task) { + _z_task_t *ptr = &task->_this._val; z_result_t ret = _z_task_join(ptr); _z_task_free(&ptr); return ret;