STRUCT LINEEVENT_STATE(9)
π struct lineevent_state(9) π
okay bestie, so this is from the Kernel API Manual and it's literally the whole personality of a userspace event, like the state that holds the entire vibe of one. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
struct lineevent_state β contains the state of a userspace event π
like yes that's the whole name and it ate, no notes
πΈ SYNOPSIS πΈ
struct lineevent_state {
struct gpio_device *gdev;
const char *label;
struct gpio_desc *desc;
u32 eflags;
int irq;
wait_queue_head_t wait;
struct notifier_block device_unregistered_nb;
struct gpioevent_data *events;
u64 timestamp;
};
that's the whole struct, every field, exactly as it lives in the kernel, not me editing anything, i would NEVER π€
π Members π
gdevβ the GPIO device this event is about, like the main character it's attached to πlabelβ the consumer label, used to tag descriptors, so you know who this event belongs to π·οΈdescβ the GPIO descriptor that this event is literally holding onto πeflagsβ the event flags this line was requested with, so it remembers its own settings fr frirqβ the interrupt that triggers in response to events on this GPIO β‘waitβ the wait queue that handles blocking reads of events, aka where your read goes to nap π΄device_unregistered_nbβ the notifier block for receivinggdevunregister events, so we hear about the breakup π΅eventsβ the KFIFO for the GPIO events, a little first-in-first-out cutie lineup π§timestampβ a cache for the timestamp, storing it between the hardirq and the IRQ thread, used to bring the timestamp close to the actual event β like it's right there when the thing happens, not fashionably late β°
π¦ SEE ALSO π¦
- Kernel file
./drivers/gpio/gpiolib-cdev.c struct linehandle_state(9)struct line(9)struct linereq(9)gpio_chrdev_open(9)gpio_chrdev_release(9)
all the linked besties, go read them, iykyk π
lowkey a reminder that this is kernel API territory β respect the struct, don't go inventing fields, the compiler will absolutely humble you π
so yeah that's the page π and for the sign-off: this one comes from the source path ./drivers/gpio, dated October 2026, and it's filed under struct lineevent_state(9) β iconic, no cap π
β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms