From owner-freebsd-hackers Mon Oct 20 23:06:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA21678 for hackers-outgoing; Mon, 20 Oct 1997 23:06:10 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from safeconcept.utimaco.co.at (mail-gw.utimaco.co.at [195.96.28.162]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA21670 for ; Mon, 20 Oct 1997 23:06:01 -0700 (PDT) (envelope-from Michael.Schuster@utimaco.co.at) Received: (from uucp@localhost) by safeconcept.utimaco.co.at (8.8.5/8.8.5) id HAA03404 for ; Tue, 21 Oct 1997 07:53:59 +0200 (CEST) Received: from wshpux.utimaco.co.at(10.0.0.18) by safeconcept via smap (V2.0) id xma003402; Tue, 21 Oct 97 07:53:45 +0200 Message-ID: <344C45CA.C98D731F@utimaco.co.at> Date: Tue, 21 Oct 1997 08:03:54 +0200 From: Michael Schuster Organization: Utimaco Safe Concept GmbH., Linz, Austria X-Mailer: Mozilla 4.03 [de] (X11; I; HP-UX B.10.01 9000/715) MIME-Version: 1.0 To: "hackers@FreeBSD.ORG" Subject: Re: outb() / inb() Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk James Raynard wrote: > > On Mon, Oct 20, 1997 at 08:44:33AM +0200, Michael Schuster wrote: > > > > >#define outb(port,data) \ > > > <....> \ > > > ? outbc(port,data):outbv(port,data)) > > > > which means that if you write > > outb (0x250, *c++); > > then the expression "*c++" gets evaluated twice > > Sorry, but this isn't true: only one of the outbc/outbv expressions will > be evaluated (the rules are exactly the same as for an if-else statement). oops! I got things mixed up there ... actually, it's the first argument (port) that gets evaluated (at least) twice, since it's in the expression before the "?" which I left out. sorry about that & thanks for the hint Michael -- Michael Schuster Utimaco Safe Concept GmbH. | Tel: +43 732 655755 41 Europaplatz 6 | Fax: +43 732 655755 5 A-4020 Linz Austria | email: Michael.Schuster@utimaco.co.at