Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Dec 2005 21:07:02 +0100
From:      rookie <asmrookie@gmail.com>
To:        prime <guomingyan@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Puzzled about turnstile's lock
Message-ID:  <3bbf2fe10512171207n41c9308dm@mail.gmail.com>
In-Reply-To: <1fa17f810512170027h58ccadbcq9f8d3187f35a2ddd@mail.gmail.com>
References:  <1fa17f810512170027h58ccadbcq9f8d3187f35a2ddd@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> Hi hackers,
> I want to understand the current implementation of
> turnstile,and meet some questions about its locks' logicality.


[snip]

It's used to lock td_contested member of struct thread structure and all
issues linked to it (as you can see in the source tree). It seems used in a
clean way.

Attilio

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
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org=
"
>



--
Peace can only be achieved by understanding - A. Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10512171207n41c9308dm>