From owner-cvs-all Tue Jul 3 13:38:24 2001 Delivered-To: cvs-all@freebsd.org Received: from mass.dis.org (dhcp44-21.dis.org [216.240.44.21]) by hub.freebsd.org (Postfix) with ESMTP id 00CA937B403; Tue, 3 Jul 2001 13:38:14 -0700 (PDT) (envelope-from msmith@mass.dis.org) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.4/8.11.3) with ESMTP id f63KpIm01502; Tue, 3 Jul 2001 13:51:18 -0700 (PDT) (envelope-from msmith@mass.dis.org) Message-Id: <200107032051.f63KpIm01502@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Joerg Wunsch Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys bio.h In-reply-to: Your message of "Tue, 03 Jul 2001 19:32:14 +0200." <20010703193214.A3398@uriah.heep.sax.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 03 Jul 2001 13:51:18 -0700 From: Mike Smith Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > As Mike Smith wrote: > > > > sys/sys bio.h > > > Log: > > > Define BIO_CMD{1,2}, available for local hacks, similar to the already > > > existing BIO_FLAG{1,2}. To be used in the fdc(4) driver soon. > > > > Any reason you're not using the driver-private field instead? > > Because i need to fill in a cmd value anyway, and neither of the > existing didn't fit well. Maybe a single CMD_PRIVATE value would have > sufficed, but i rather followed the other examples (CMD_FLAG{1,2} > etc). Neither of these was at all necesssary. > Also, using a void * would have complicated matters pretty much. It's > invalid to abuse a void * as an int Er, no it's not. void *foo; int bar; bar = (int)(uintptr_t)foo; foo = (void *)(uintptr_t)bar; > , so i would have had to malloc a > single 32-bit value somewhere since i can't use a variable located on > the stack, and pass its address down in one of the void * field. No. Instead you've added more magic to the bio struct, heading straight back towards turning it into the bloated monstrosity that the old buf struct was. If you need a private 'command' structure to pass stuff around inside your driver, perhaps you should just create one? -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message