Skip to content

Commit

Permalink
fix: misra issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Mar 27, 2024
1 parent f43d3bc commit 143075f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/system/espidf/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,17 @@ static z_task_attr_t z_default_task_attr = {
};

/*------------------ Thread ------------------*/
int8_t z_task_init(z_task_t *task, z_task_attr_t *attr, void *(*fun)(void *), void *arg) {
int8_t z_task_init(z_task_t *task, z_task_attr_t *arg_attr, void *(*fun)(void *), void *arg) {
z_task_attr_t *attr = arg_attr;
z_task_arg *z_arg = (z_task_arg *)z_malloc(sizeof(z_task_arg));
if (z_arg == NULL) {
return -1;
}

z_arg->fun = fun;
z_arg->arg = arg;
z_arg->join_event = task->join_event = xEventGroupCreate();
task->join_event = xEventGroupCreate();
z_arg->join_event = task->join_event;

if (attr == NULL) {
attr = &z_default_task_attr;
Expand Down Expand Up @@ -154,7 +156,6 @@ int z_sleep_ms(size_t time) {
// This may compound, so this approach may make sleeps longer than expected.
// This extra check tries to minimize the amount of extra time it might sleep.
while (z_time_elapsed_ms(&start) < time) {
// z_sleep_us(1000);
vTaskDelay(1 / portTICK_PERIOD_MS);
}

Expand Down

0 comments on commit 143075f

Please sign in to comment.