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

Fix z_task_init argument signature #784

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/zenoh_commons.h
Original file line number Diff line number Diff line change
Expand Up @@ -4149,7 +4149,7 @@ ZENOHC_API void z_task_drop(struct z_moved_task_t *this_);
ZENOHC_API
z_result_t z_task_init(struct z_owned_task_t *this_,
const struct z_task_attr_t *_attr,
void (*fun)(void *arg),
void *(*fun)(void *arg),
void *arg);
/**
* Joins the task and releases all allocated resources
Expand Down
4 changes: 2 additions & 2 deletions src/platform/synchronization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ pub extern "C" fn z_internal_task_check(this_: &z_owned_task_t) -> bool {
}

struct FunArgPair {
fun: unsafe extern "C" fn(arg: *mut c_void),
fun: unsafe extern "C" fn(arg: *mut c_void) -> *mut c_void,
arg: *mut c_void,
}

Expand All @@ -265,7 +265,7 @@ unsafe impl Send for FunArgPair {}
pub unsafe extern "C" fn z_task_init(
this: &mut MaybeUninit<z_owned_task_t>,
_attr: *const z_task_attr_t,
fun: unsafe extern "C" fn(arg: *mut c_void),
fun: unsafe extern "C" fn(arg: *mut c_void) -> *mut c_void,
arg: *mut c_void,
) -> result::z_result_t {
let this = this.as_rust_type_mut_uninit();
Expand Down