Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Sep 2003 10:50:58 -0700 (PDT)
From:      Frank Mayhar <frank@exit.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        smp@freebsd.org
Subject:   Re: atomicity of unlocked reads
Message-ID:  <200309171750.h8HHowEf092627@realtime.exit.com>
In-Reply-To: <XFMail.20030917114537.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> I think you can assume that the read will be atomic.  I don't think FreeBSD
> would work very well on a machine where aligned pointer reads/writes weren't
> atomic.

I dunno, I tend to think that making such assumptions may well come back to
bite me in the ass when I least expect it.  In such situation, I invariably
use some kind of "atomic_xxx_load/store" primitive that does the job safely
and in a machine-dependent way while hiding the details from the MI code.

Just call me paranoid.
-- 
Frank Mayhar frank@exit.com	http://www.exit.com/
Exit Consulting                 http://www.gpsclock.com/
                                http://www.exit.com/blog/frank/



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