Re: pushing data via ioctl from kernel??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marco,

Thanks for your reply. Your suggestion fits what I want to do. I had
also read up on mmap suggested by Arnold and it appears to have better
performance than async. However, it seems more difficult to implement. 

:-P

What I have in mind is to measure timings of events and send the data to
userspace. The information will be send via socket to a server. So I
think a simple and light solution will suffice. 

I guess I will go for a poll and async solution.

Thanks again.
Have a nice day.

On Mon, 2002-08-19 at 14:15, Marco Cova wrote:
> On Tue, Aug 20, 2002 at 02:59:45AM -0400, Jonathan Khoo wrote:
> > Hi guys,
> > 
> > Is it possible for the kernel to push data to the userspace via ioctl
> > calls? What I have in mind is for a program in the userspace to open an
> > ioctl call to a module, the module is responsible for collecting data
> > and whenever there is new updates, the module will push the data to the
> > userspace.
> 
> Mmmh, if I understand correctly, the asynchronous notification
> mechanism does exactly what you want to do. 
> 
> A userspace program registers itself to enable notification from an
> input file; the kernel is responsible for sending a SIGIO signal to
> registered programs whenever new data is available from that input
> file; the program handles the signal and does what it has to do.
> 
> For a detailed description, see:
> http://www.xml.com/ldd/chapter/book/ch05.html#t4
> 
> There are many examples of drivers that use this mechanism, see for
> example:
> $(linux)/drivers/char/busmouse.c
> 
> HTH,
> Marco
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux