Skip to content

Commit

Permalink
test_fc
Browse files Browse the repository at this point in the history
  • Loading branch information
nunojsa committed Feb 10, 2025
1 parent bd47fe9 commit 9033f9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions iiod-responder.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,9 @@ int iiod_io_wait_for_command_done(struct iiod_io *io)
iio_task_cancel(token);
}

printf("Wait for command done (%d)\n", (unsigned int)(timeout_ms - diff_ms));
ret = iio_task_sync(token, (unsigned int)(timeout_ms - diff_ms));
printf("Done waiting...\n");

iio_mutex_lock(io->lock);
io->write_token = NULL;
Expand Down
8 changes: 4 additions & 4 deletions task.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,17 +380,17 @@ void iio_task_cancel(struct iio_task_token *token)
found = iio_task_token_find(task, token, true);
iio_mutex_unlock(task->lock);

if (found) {
//if (found) {
iio_mutex_lock(token->done_lock);
token->done = true;
token->ret = -ETIMEDOUT;
iio_cond_signal(token->done_cond);
iio_mutex_unlock(token->done_lock);
} else {
/*} else {
iio_mutex_lock(token->done_lock);
printf("Token entry ongoing... %d\n", token->done);
printf("Token entry done/ongoing... %d\n", token->done);
iio_mutex_unlock(token->done_lock);
}
}*/

/* If it wasn't removed from the list, it's being processed or
* has been processed already; there is nothing to do here. */
Expand Down

0 comments on commit 9033f9a

Please sign in to comment.