From owner-cvs-all Wed Nov 27 3:37:33 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14B8937B401; Wed, 27 Nov 2002 03:37:32 -0800 (PST) Received: from gate.qubesoft.com (gate.qubesoft.com [217.169.36.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F55E43EAF; Wed, 27 Nov 2002 03:37:31 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from bluebottle.qubesoft.com (bluebottle [192.168.1.2]) by gate.qubesoft.com (8.12.6/8.12.6) with ESMTP id gARBb9DC018002; Wed, 27 Nov 2002 11:37:09 GMT (envelope-from dfr@nlsystems.com) Received: from builder02.qubesoft.com (builder02.qubesoft.com [192.168.1.8]) by bluebottle.qubesoft.com (8.12.6/8.12.6) with ESMTP id gARBb5Y2041085; Wed, 27 Nov 2002 11:37:09 GMT (envelope-from dfr@nlsystems.com) Subject: Re: cvs commit: src/sys/sys rman.h src/sys/kern subr_rman.c From: Doug Rabson To: Warner Losh Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org In-Reply-To: <200211270355.gAR3tMQh036625@repoman.freebsd.org> References: <200211270355.gAR3tMQh036625@repoman.freebsd.org> Content-Type: text/plain Organization: Message-Id: <1038397024.8963.1.camel@builder02.qubesoft.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 27 Nov 2002 11:37:04 +0000 Content-Transfer-Encoding: 7bit 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 On Wed, 2002-11-27 at 03:55, Warner Losh wrote: > imp 2002/11/26 19:55:22 PST > > Modified files: > sys/sys rman.h > sys/kern subr_rman.c > Log: > Make the rman_{get,set}_* macros into real functions. The macros > create an ABI that encodes offsets and sizes of structures into client > drivers. The functions isolate the ABI from changes to the resource > structure. Since these are used very rarely (once at startup), the > speed penalty will be down in the noise. > > Also, add r_rid to the structure so that clients can save the 'rid' of > the resource in the struct resource, plus accessor functions. Future > additions to newbus will make use of this to present a simplified > interface for resource specification. Can you move the structures out of the public header file now? I originally wanted to hide the structures inside the implementation but Garret wanted to allow direct access to the structures, I seem to remember. The macros were a compromise. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message