Re: Messaging between kernel modules and User Apps

From: Richard B. Johnson
Date: Thu Aug 21 2003 - 10:18:48 EST


On Thu, 21 Aug 2003, Pankaj Garg wrote:

> Hi,
>
> I am writing a kernel module. The module will need to send asynchronous
> messages to a User Application. Is there a good and efficient way of
> doing this?
>
>
> Thanks,
> Pankaj
>
The de facto standard for network devices is to use sockets.
For character and and block devices Unix/Linux uses the
open/poll/ioctl/read mechanisms.
Some Linux drivers use the /proc file-system for 'information'.
You could send your module a pid via proc and have it send a
signal to your application as a result of an event.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/