Skip to content

Commit

Permalink
fixed eventfd_signal for kernels >= 6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
robertzaage authored and mbrooksx committed Apr 25, 2024
1 parent 09385d4 commit 5815ee3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/gasket_interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,13 @@ gasket_handle_interrupt(struct gasket_interrupt_data *interrupt_data,
trace_gasket_interrupt_event(interrupt_data->name, interrupt_index);
read_lock(&interrupt_data->eventfd_ctx_lock);
ctx = interrupt_data->eventfd_ctxs[interrupt_index];
if (ctx)
eventfd_signal(ctx, 1);
read_unlock(&interrupt_data->eventfd_ctx_lock);
if (ctx)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0)
eventfd_signal(ctx);
#else
eventfd_signal(ctx, 1);
#endif
read_unlock(&interrupt_data->eventfd_ctx_lock);

++(interrupt_data->interrupt_counts[interrupt_index]);
}
Expand Down

0 comments on commit 5815ee3

Please sign in to comment.