Re: Using Poll/Select In Kernel Modules

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

 



 i wanted to establish communications between different kernel modules (
> infact kernel 'streams' modules ). So i thought of using kernel sockets for
> time being. In doing so --- 'm creating a thread to wait on a particular
> port. But i dont want this to be blocking and eating up resources. so i
> thought of using something similar to poll/select in user-land.

Please  reply to the whole list in future; that way someone else who
might know the answers to your question can respond.

> ' Is there any way in kernel space to wait for any file/socket descriptor to
> change instead of blocking continuously ??? '

Tell us what exactly you are trying to do; why use a socket, why not
something like shared memory to communicate between modules? Or kernel
notifiers (IIRC: linux/notifier.h). Also, using fd's in kernel is not
recommended. Use file structures. You could create a user-land app
that ioctl()'s into module_1; module_1 requests user_app to access
module_2 and it does so through another ioctl().

./h
--
Operating Systems and Computer Architecture Research  - University of Cincinnati
http://www.ececs.uc.edu/~mohapth

--
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