On Wed, 3 Jan 2007 09:31:30 -0600
Corey Minyard <[EMAIL PROTECTED]> wrote:

>   found:
> +     smp_rmb();
>       /* Note that each existing user holds a refcount to the interface. */
>       kref_get(&intf->refcount);
>  
> @@ -2761,6 +2763,7 @@
>               kref_put(&intf->refcount, intf_free);
>       } else {
>               /* After this point the interface is legal to use. */
> +             smp_wmb(); /* Keep memory order straight for RCU readers. */
>               intf->intf_num = i;
>               mutex_unlock(&ipmi_interfaces_mutex);
>               call_smi_watchers(i, intf->si_dev);
> @@ -3924,6 +3927,8 @@
>                       /* Interface was not ready yet. */
>                       continue;
>  
> +             smp_rmb();
> +

It's nice to always have a comment explaining the use of open-coded
barriers.  Because often the reader is left wondered what on earth it's
barriering against what on earth else.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to