On Mon, 1 Oct 2007, Denys Vlasenko wrote:Indeed. You could simulate non-blocking using poll with zero timeout, but if another task may read/write on it, your following read/write may end up blocking even after a poll returned the required events. One way to solve this would be some sort of readx/writex where you pass an extra flags parameter (this could be done with sys_indirect, assuming we'll ever get that mainline) where you specify the non-blocking requirement for-this-call, and not as global per-file flag. Then, of course, you'll have to modify all the "file->f_flags & O_NONBLOCK" tests (and there are many of them) to check for that flag too (that can be a per task_struct flag). - Davide -
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Linus Torvalds | Linux 2.6.21-rc1 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| pageexec | Re: [stable] Linux 2.6.25.10 |
| Linus Torvalds | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Jarek Poplawski | [PATCH take 2] pkt_sched: Protect gen estimators under est_lock. |
git: | |
