* Messaging between kernel modules and User Apps
@ 2003-08-21 14:44 Pankaj Garg
2003-08-21 14:53 ` P
2003-08-21 15:14 ` Richard B. Johnson
0 siblings, 2 replies; 7+ messages in thread
From: Pankaj Garg @ 2003-08-21 14:44 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Messaging between kernel modules and User Apps
2003-08-21 14:44 Messaging between kernel modules and User Apps Pankaj Garg
@ 2003-08-21 14:53 ` P
2003-08-21 15:14 ` Richard B. Johnson
1 sibling, 0 replies; 7+ messages in thread
From: P @ 2003-08-21 14:53 UTC (permalink / raw)
To: Pankaj Garg; +Cc: linux-kernel
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?
netlink socket?
Pádraig.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Messaging between kernel modules and User Apps
2003-08-21 14:44 Messaging between kernel modules and User Apps Pankaj Garg
2003-08-21 14:53 ` P
@ 2003-08-21 15:14 ` Richard B. Johnson
2003-08-21 15:59 ` Zwane Mwaikambo
1 sibling, 1 reply; 7+ messages in thread
From: Richard B. Johnson @ 2003-08-21 15:14 UTC (permalink / raw)
To: Pankaj Garg; +Cc: Linux kernel
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.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Messaging between kernel modules and User Apps
2003-08-21 15:14 ` Richard B. Johnson
@ 2003-08-21 15:59 ` Zwane Mwaikambo
0 siblings, 0 replies; 7+ messages in thread
From: Zwane Mwaikambo @ 2003-08-21 15:59 UTC (permalink / raw)
To: Richard B. Johnson; +Cc: Pankaj Garg, Linux kernel
On Thu, 21 Aug 2003, Richard B. Johnson wrote:
> 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.
That sounds fine, but..
> You could send your module a pid via proc and have it send a
> signal to your application as a result of an event.
... please don't even entertain such sick ideas.
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Messaging between kernel modules and User Apps
@ 2003-08-21 15:05 Heater, Daniel (IndSys, GEFanuc, VMIC)
0 siblings, 0 replies; 7+ messages in thread
From: Heater, Daniel (IndSys, GEFanuc, VMIC) @ 2003-08-21 15:05 UTC (permalink / raw)
To: 'Pankaj Garg', linux-kernel
> 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?
Let user space read the data from a device file.
Use poll/select to handle the asynchronous notification.
The other option is to have the driver send a signal to user space.
I've done that before, but at best it's a hack and not neatly supported
by the Linux driver model.
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mYVo.39N.19@gated-at.bofh.it>]
end of thread, other threads:[~2003-08-21 17:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-21 14:44 Messaging between kernel modules and User Apps Pankaj Garg
2003-08-21 14:53 ` P
2003-08-21 15:14 ` Richard B. Johnson
2003-08-21 15:59 ` Zwane Mwaikambo
-- strict thread matches above, loose matches on Subject: below --
2003-08-21 15:05 Heater, Daniel (IndSys, GEFanuc, VMIC)
[not found] <mYVo.39N.19@gated-at.bofh.it>
[not found] ` <mZou.3Ff.29@gated-at.bofh.it>
[not found] ` <n0ud.4F4.15@gated-at.bofh.it>
2003-08-21 16:56 ` Ihar 'Philips' Filipau
2003-08-21 17:23 ` Richard B. Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox