Date: Mon, 24 May 2010 20:40:16 -0700 From: Greg Lewis <glewis@eyesbeyond.com> To: Bruce Evans <brde@optusnet.com.au> Cc: svn-src-head@freebsd.org, Poul-Henning Kamp <phk@phk.freebsd.dk>, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r208332 - in head/sys: amd64/include i386/include Message-ID: <20100525034016.GA75384@misty.eyesbeyond.com> In-Reply-To: <20100523230410.K17698@delplex.bde.org> References: <11069.1274618175@critter.freebsd.dk> <20100523230410.K17698@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 23, 2010 at 11:15:09PM +1000, Bruce Evans wrote: > On Sun, 23 May 2010, Poul-Henning Kamp wrote: > > 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). > > Pehraps, but <machine/atomic.h> was only designed, implemented and > documented for use in the kernel. And of course any standardized version > won't look like the FreeBSD kernel one. The kernel one is too bloated > for me, but a general-purpose one should be even more bloated so as > to support all types and more than atomic ops. The FreeBSD port of the "Zero" Java VM uses <machine/atomic.h>. Well, except on sparc64 where <machine/atomic.h> pulls in too much namespace pollution and it instead includes chunks of the header verbatim instead :(. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100525034016.GA75384>