From owner-cvs-src@FreeBSD.ORG Tue Mar 28 20:04:33 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F2DE816A422; Tue, 28 Mar 2006 20:04:32 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64B5743D68; Tue, 28 Mar 2006 20:04:05 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.6/8.13.6/NETPLEX) with ESMTP id k2SK40mZ013960; Tue, 28 Mar 2006 15:04:00 -0500 (EST) Date: Tue, 28 Mar 2006 15:04:00 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= In-Reply-To: <86acbawerh.fsf@xps.des.no> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, John Baldwin Subject: Re: cvs commit: src/sys/i386/include atomic.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 20:04:33 -0000 On Tue, 28 Mar 2006, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote: > John Baldwin 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