cvs commit: src/sys/kern tty.c
Martin Blapp
mb at imp.ch
Wed Dec 20 11:44:12 PST 2006
Hi,
>Ok, after a quick look at the patch (and this note) it makes more
>sense to me, but then would not be cleaner to do something like:
>
> sx_slock(&proctree_lock);
> if (tp->t_session && tp->t_session->s_leader) { ...
> }
> sx_sunlock(&proctree_lock);
>
You mean to restore rev. 1.258 ?
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/tty.c.diff?r1=1.257&r2=1.258
The answer is easy, rev. 1.258 costs more in the cases where tp->t_session is
already empty and we don't need to add a proctree lock and can just continue.
We need the proctree lock only if tp->t_session exists. You can call rev. 1.267
less invasive than rev. 1.258 :-)
--
Martin
More information about the cvs-src
mailing list