Puzzled about turnstile's lock

prime guomingyan at gmail.com
Sat Dec 17 00:27:29 PST 2005


Hi hackers,
I want to understand the current implementation of
turnstile,and meet some questions about its locks' logicality.

turnstile's ``ts_blocked" field is protected by both
``td_contested" lock and its turnstile_chain lock, but
I think its turnstile_chain lock is enough,because we
allways get the turnstile_chain lock before our manipulation
on ``ts_blocked".
If td_contested lock were needed ,reading ts_blocked is
not protected by td_contested lock,in the kernel source, why?

Thanks.
--
Three passions, simple but overwhelmingly strong, have governed my life:
the longing for love, the search for knowledge, and unbearable pity for
the suffering of mankind.
                         ---------Bertrand Russell


More information about the freebsd-hackers mailing list