can the kernel wait?

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

 



Hi, a question:

I need that a function in a LKM waits for a result of an operation performed 
by a daemon, is like this:

- the daemon open a /proc file (I know it should be a /dev file I'll chanche 
it)
- read from it, and if a buffer is empty it go to sleep
- then when a sys_open call is made (My_sys_open is called first) it wake up 
the daemon ho read the path of the file from the buffer, check for certain 
patterns and return the results to the LKM writing in the /proc (/dev) file

Now, what is my question:

how can I meke that My_sys_open wait for the result comming via the write 
function?.
Otherwise if someone have another idea..

thanks in advance
Israel
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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