Am Montag, 20. Dezember 2004 08:04 schrieb Pete Zaitcev:
> + add_wait_queue(&rp->wait, &waita);
> + while ((ep = mon_text_fetch(rp, mbus)) == NULL) {
> + if (file->f_flags & O_NONBLOCK) {
> + remove_wait_queue(&rp->wait, &waita);
> + return -EWOULDBLOCK; /* Same as EAGAIN in Linux */
> + }
> + /*
> + * We do not count nwaiters, because ->release is supposed
> + * to be called when all openers are gone only.
> + */
> + set_current_state(TASK_INTERRUPTIBLE);
Here you can lose a wakeup.
> + schedule();
> + if (signal_pending(current)) {
> + remove_wait_queue(&rp->wait, &waita);
> + return -EINTR;
> + }
> + }
> + remove_wait_queue(&rp->wait, &waita);
Regards
Oliver