Re: td->td_critnest manipulations do not use atomic_add_int ?

From: John Baldwin <jhb_at_freebsd.org>
Date: Tue, 20 Dec 2005 14:22:35 -0500
On Tuesday 20 December 2005 02:04 pm, Julian Elischer wrote:
> Luigi Rizzo wrote:
> >as in the subject... i see that td->td_critnest (used to determine
> >whether a thread can be preempted or not) is manipulated using
> >plain ++ or -- instruction instead of the atomic_add_int().
> >
> >I wonder if declaring it as volatile and possibly its
> >usage patterns are enough to make the two things equivalent
> >on all architectures.
>
> is td ever != curthread?

No.

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Tue Dec 20 2005 - 18:22:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:49 UTC