From owner-p4-projects Sat Jun 1 9:44:41 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 500EA37B406; Sat, 1 Jun 2002 09:44:36 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from evilpete.dyndns.org (12-232-26-46.client.attbi.com [12.232.26.46]) by hub.freebsd.org (Postfix) with ESMTP id ED6D737B400; Sat, 1 Jun 2002 09:44:33 -0700 (PDT) Received: from overcee.wemm.org ([10.0.0.3]) by evilpete.dyndns.org (8.11.6/8.11.6) with ESMTP id g51GiX180063; Sat, 1 Jun 2002 09:44:33 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 39F2D380A; Sat, 1 Jun 2002 09:44:33 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Julian Elischer Cc: Jake Burkholder , Julian Elischer , Perforce Change Reviews Subject: Re: PERFORCE change 12179 for review In-Reply-To: Date: Sat, 01 Jun 2002 09:44:33 -0700 From: Peter Wemm Message-Id: <20020601164433.39F2D380A@overcee.wemm.org> Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Julian Elischer wrote: > > > On Fri, 31 May 2002, Jake Burkholder wrote: > > > Apparently, On Thu, May 30, 2002 at 10:57:02PM -0700, > > Julian Elischer said words to the effect of; > > > > > http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12179 > > > > > > Change 12179 by julian@julian_ref on 2002/05/30 22:56:19 > > > > > > Use fuword and suword instead of copyin/copyout > > > when setting up thread completion mailboxes. > > > needs fptr and sptr, which I will add soon. > > > > Please do not add these without discussing it first. fuword and > > suword take a long as their argument/return value, which works > > fine. > > except that you have to cast the results.. > It'd be nice if there was one guaranteed to return a (void *) > preferably at a second argument so that a success value can be given as > well. > (I decided not to add it myself unilaterally but rather to lobby for it > amongst types such as yourself..) > > There is no guarantee that on every imaginable architecture > that the same long<->pointer conversion is correct, and anyhow the casting > is wrong.. it wouldn't take much to make a retval = fptr(addr, &target) > call. It breaks on x86 where you can configure long to be 64 bit but pointers are 32 bit still. suword() would trash stuff in that case. dfr has added suword32/64 and friends. I'd like suptr/fuptr or something like that as well. The *ptr version would accept/return a void *. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message