[uClinux-dev] Re: [uClinux-dev] Two questions about drivers

JoeyShen shen_zl at 263.net
Thu Nov 29 02:40:56 EST 2001

An HTML attachment was scrubbed...
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20011129/927b7743/attachment.html>
-------------- next part --------------
It's very nice of you, Greg!
I can always count on your answers :).

>Follow the flow of execution from the open system call 
>entry point in ~/linux/fs/open.c, function is sys_open().

OK, I will read it. There are still too many things to do before I can go further with linux.:)

>Yes. It is up to the driver code to honor the O_NONBLOCK flag.
>(And you don't need this flag to use select(). The idea is that
>you select until you can read, and thus the read will not block
>when you do call it).

Um...that's it! I think I understand now. I can open the devices without the O_NONBLOCK flag , then I select them, and when the interrupt occurs (that means something have arrived at the buffer), FD_ISSET will tell me which device can be read. So when I'm gonna read it, it will not block. Am I right?

but there is still one more question. How dose select( ) know about when interrupts occur, and then set the flags so that FD_ISSET can tell? Should I do something in the interrupt handlers?


More information about the uClinux-dev mailing list