LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   poll_wait related (https://www.linuxquestions.org/questions/linux-newbie-8/poll_wait-related-304967/)

rupeshk73 03-23-2005 03:16 AM

poll_wait related
 
Hi

Please let me know the following things.

1. one of my application is doing a select() system
call and waiting for characters typed from
keyboard.
2. In the kernel we use a wrapper function which
uses poll_wait() inside.
3. This wrapper is called when user calls select().

4. In kernel I am replicating duart_int() ISR by my
own routine where the input characters are taken
from my buffer instead of keyboard.
5. When I do this all my string is seen properly in
tty->read_buf.

6. now this characters from my buffer is not read
into the application where select is used.
(It works properly for normal situations.)

Please let me know what is the trigger I need to
provide from kernel after my string is put into
tty->read_buf

In other way...

What is the signal, select() or poll_wait() has to
receive from kernel so that application starts
reading my charaters from tty->read_buf ?

Thanks
Rupesh

foo_bar_foo 03-24-2005 05:36 PM

select registers a file descriptor
then select() indicates events on that file descriptor

visaris 03-24-2005 07:12 PM

I think you would have better luck posting this in a more advanced programming/kernel dev forum. Unless you want to get more responses like the previous one that is. I think your question may be a little advanced for this "newbie" forum. I understand the problem you are having, but I don't know the internels of the kernel at all, so I have no idea how to cause select to return like you need.


All times are GMT -5. The time now is 04:58 PM.