Date: Tue, 21 Oct 1997 08:03:54 +0200 From: Michael Schuster <Michael.Schuster@utimaco.co.at> To: "hackers@FreeBSD.ORG" <hackers@FreeBSD.ORG> Subject: Re: outb() / inb() Message-ID: <344C45CA.C98D731F@utimaco.co.at>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?344C45CA.C98D731F>