kill_fasync usage
Quoted 3 lines · SA
I wnat to use
kill_fasync(struct fasync_struct *PTR,...)to notify userland of events. Can I just callkill_fasyncregardless 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