From owner-cvs-all Tue Nov 26 19:59: 0 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 AE4E737B401; Tue, 26 Nov 2002 19:58:59 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7159043EC2; Tue, 26 Nov 2002 19:58:59 -0800 (PST) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gAR3tMmV036626; Tue, 26 Nov 2002 19:55:22 -0800 (PST) (envelope-from imp@repoman.freebsd.org) Received: (from imp@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gAR3tMQh036625; Tue, 26 Nov 2002 19:55:22 -0800 (PST) Message-Id: <200211270355.gAR3tMQh036625@repoman.freebsd.org> From: Warner Losh Date: Tue, 26 Nov 2002 19:55:22 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/sys rman.h src/sys/kern subr_rman.c X-FreeBSD-CVS-Branch: HEAD 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 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. Approved by: re (jhb) Reviewed by: jhb, jake Revision Changes Path 1.27 +72 -0 src/sys/kern/subr_rman.c 1.18 +13 -10 src/sys/sys/rman.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message