Skip to contentSkip to conversation

kill_fasync usage

DISCUSSION Manfred Spraul 1 participant 1 message Mar 4, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines · SA

I wnat to use kill_fasync(struct fasync_struct *PTR,...) to notify userland of events. Can I just call kill_fasync regardless of the state of PTR or does PTR actually have to point to something valid.

kill_fasync receives the _address_ of the variable that contains the list of processes that need notifications. It must not be NULL. (I assume you look at 2.4 or 2.5 - 2.2 had a different interface)

Check linux/drivers/char/busmouse.c for an example, the interface is simple: call fasync_helper to register and kill_fasync for the actual notification.

--
Manfred