2006/12/20, Martin Blapp <[EMAIL PROTECTED]>:
Hi, > Since proctree_lock is a sx lock which uses 2 condition variables, > they alredy drop Giant (DROP_GIANT()) before sleeping. Are you secure > it is the right thing to do here? Yes I am. sx_slock() can call cv_wait() which later can call cv_wait_unlock ... if there is already a lock we need to share ... After a possible sleep cv_wait_unlock looks like: cv_wait_unlock(struct cv *cvp, struct mtx *mp) [...] sleepq_lock(cvp); cvp->cv_waiters++; DROP_GIANT(); mtx_unlock(mp); [...] It can call DROP_GIANT for a short amount of time. This was the race.
No, it drops Giant for all the time it sleeps. Maybe the race is somewhere else. Attilio -- Peace can only be achieved by understanding - A. Einstein _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "[EMAIL PROTECTED]"