pr_wait() waits for a process to stop or until timer expiry.

From:

http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/proc/prcontrol.c#1290

/*
 * Wait until process/lwp stops or until timer expires.
 * Return EINTR for an interruption, -1 for timeout, else 0.
 */
int
pr_wait(prcommon_t *pcp,        /* prcommon referring to process/lwp */
        timestruc_t *ts,        /* absolute time of timeout, if any */
        int timecheck)
{
        int rval;

        ASSERT(MUTEX_HELD(&pcp->prc_mutex));
        rval = cv_waituntil_sig(&pcp->prc_wait, &pcp->prc_mutex, ts, timecheck);
        mutex_exit(&pcp->prc_mutex);
        switch (rval) {
        case 0:
                return (EINTR);
        case -1:
                return (-1);
        default:
                return (0);
        }
}

The cv pr_wait() sleeps upon should be awakened by prnotify(), which makes me 
wonder whether your vnode code is working properly for waiters sleeping on 
/proc nodes.

You may want to examine the code in stop() to see how all this is supposed to 
work, as the pflags output shows the pfiles thread you're interested in is in 
fact stopped as requested:

/1: flags = STOPPED|ISTOP|ASLEEP read(0x0,0x4041f0,0x2000)
why = PR_REQUESTED

Since you don't have kmdb capabilitiy, you may need to add printfs to stop() to 
find out why prnotify() isn't being called or if it is why it isn't waking you 
up.
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to