whoops
This commit is contained in:
parent
a84e4cf872
commit
232c2a9e4b
2 changed files with 3 additions and 1 deletions
|
|
@ -215,7 +215,7 @@ void *input_dev_thread_func(void *ptr) {
|
|||
|
||||
pthread_t incoming_events_thread;
|
||||
|
||||
const int incoming_events_thread_creation = pthread_create(&incoming_events_thread, NULL, input_read_thread_func, (void*)ctx.dev);
|
||||
const int incoming_events_thread_creation = pthread_create(&incoming_events_thread, NULL, input_read_thread_func, (void*)&ctx);
|
||||
if (incoming_events_thread_creation != 0) {
|
||||
fprintf(stderr, "Error creating the input thread for device %s: %d\n", libevdev_get_name(ctx.dev), incoming_events_thread_creation);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,6 +164,8 @@ void *output_dev_thread_func(void *ptr) {
|
|||
msg->ev.value
|
||||
);
|
||||
|
||||
// from now on it's forbidden to use this memory
|
||||
msg->flags |= MESSAGE_FLAGS_HANDLE_DONE;
|
||||
} else if (pop_res == -1) {
|
||||
// timed out read
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue