When coda waits for a message it executes the routine below? Is this
OK? I am asking because the routines interruptible_sleep_on etc are much
more careful, but I don't understand the details there.
Thanks for any help!
- Peter -
(ps this is not in 2.1.73 yet, I'll send a patch tomorrow or so).
static inline void coda_waitfor_upcall(struct vmsg *vmp)
{
struct wait_queue wait = { current, NULL };
vmp->vm_posttime = jiffies;
add_wait_queue(&vmp->vm_sleep, &wait);
for (;;) {
if ( coda_hard == 0 )
current->state = TASK_INTERRUPTIBLE;
else
current->state = TASK_UNINTERRUPTIBLE;
if ( vmp->vm_flags & VM_WRITE )
break;
if (signal_pending(current) &&
(jiffies > vmp->vm_posttime + coda_timeout * HZ) )
break;
schedule();
}
remove_wait_queue(&vmp->vm_sleep, &wait);
current->state = TASK_RUNNING;
return;
}