Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 May 2010 12:36:15 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r208332 - in head/sys: amd64/include i386/include 
Message-ID:  <11069.1274618175@critter.freebsd.dk>
In-Reply-To: Your message of "Sun, 23 May 2010 19:01:41 %2B1000." <20100523183502.C13588@delplex.bde.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20100523183502.C13588@delplex.bde.org>, Bruce Evans writes:
>On Thu, 20 May 2010, Poul-Henning Kamp wrote:

><machine/atomic.h> should be kernel-only.

No, it absolutely should not, if anything, it should be pushed as
international standards (with <sys/endian.h>, and <sys/queue.h>).

Atomic operations and write barriers are necessary when multiple
threads or processes cooperate using shared memory. and if anything
the bug is that POSIX has not updated pthreads to have these and
other necessary primitives.  (pthread_mutex_assert_held() for instance).

I agree that FlexeLint is a bit hysterical at times, but when the
issue can be avioded at a "cost" of increased clarity of intention,
I don't see any reason to not do so.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



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