td->td_critnest manipulations do not use atomic_add_int ?

Julian Elischer julian at elischer.org
Tue Dec 20 11:04:10 PST 2005


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?

>cheers
>luigi
>_______________________________________________
>freebsd-current at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-current
>To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
>  
>


More information about the freebsd-current mailing list