Debugging

This commit is contained in:
Denis 2023-11-10 21:55:36 +01:00
parent ddff9c2306
commit 30ded9e56c
No known key found for this signature in database
GPG key ID: DD9B63F805CF5C03
2 changed files with 3 additions and 0 deletions

View file

@ -100,6 +100,7 @@ static void* iio_read_thread_func(void* ptr) {
if ((ctx->messages[h].flags & MESSAGE_FLAGS_HANDLE_DONE) != 0) { if ((ctx->messages[h].flags & MESSAGE_FLAGS_HANDLE_DONE) != 0) {
msg = &ctx->messages[h]; msg = &ctx->messages[h];
msg->ev_count = 0; msg->ev_count = 0;
printf("FOUND ONE!!!!");
break; break;
} }
} }
@ -445,6 +446,7 @@ void *input_dev_thread_func(void *ptr) {
}; };
for (int h = 0; h < MAX_MESSAGES_IN_FLIGHT; ++h) { for (int h = 0; h < MAX_MESSAGES_IN_FLIGHT; ++h) {
printf("INIT!!!!");
ctx.messages[h].flags = MESSAGE_FLAGS_HANDLE_DONE; ctx.messages[h].flags = MESSAGE_FLAGS_HANDLE_DONE;
ctx.messages[h].ev_size = DEFAULT_EVENTS_IN_REPORT; ctx.messages[h].ev_size = DEFAULT_EVENTS_IN_REPORT;
ctx.messages[h].ev = malloc(sizeof(struct input_event) * ctx.messages[h].ev_size); ctx.messages[h].ev = malloc(sizeof(struct input_event) * ctx.messages[h].ev_size);

View file

@ -412,6 +412,7 @@ void *output_dev_thread_func(void *ptr) {
} }
// from now on it's forbidden to use this memory // from now on it's forbidden to use this memory
printf("HANDLED!!!!");
msg->flags |= MESSAGE_FLAGS_HANDLE_DONE; msg->flags |= MESSAGE_FLAGS_HANDLE_DONE;
} else if (pop_res == -1) { } else if (pop_res == -1) {
// timed out read // timed out read