Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 2006 15:04:00 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, John Baldwin <jhb@freebsd.org>
Subject:   Re: cvs commit: src/sys/i386/include atomic.h
Message-ID:  <Pine.GSO.4.43.0603281500400.18701-100000@sea.ntplx.net>
In-Reply-To: <86acbawerh.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 28 Mar 2006, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote:

> John Baldwin <jhb@freebsd.org> writes:
> > s/off/on/ I trust
> >
> > Not true.  The tinderbox would attest to that.  Please see code such as
> > this:  [...]
>
> which uses uintptr_t, not actual pointers, to avoid warnings.  In
> effect, that code is broken.
>
> Apply the attached patch, see how far a buildkernel gets...
>
> I think the proper thing to do, to cover all your bases, would be to
> define a MD atomic_*_intptr family which operated on uintptr_t, and
> define an MI atomic_*_ptr family which operates on void * based on
> that.

I would like to see that.

> > Even userland uses casts when it uses void * rather than uintptr_t for
> > the underlying type.  See src/lib/libpthread/sys/lock.c or
> > src/lib/libthr/thr_umtx.h.

I didn't like having to do that in libpthread.  It was confusing
to me.  I'd be happy if I never had to deal with uintptr_t.

>
> The latter only works because libthr is built with warnings disabled.
> I just finished working on making it build at WARNS level 2; higher
> levels will require a major overhaul, because the kernel interface it
> uses is fundamentally broken.
>
> DES
>

--=20
DE




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