From owner-cvs-src@FreeBSD.ORG Tue Jun 20 20:37:18 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B47EF16A505; Tue, 20 Jun 2006 20:37:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DB2543D73; Tue, 20 Jun 2006 20:37:18 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5KKbII9062747; Tue, 20 Jun 2006 20:37:18 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5KKbIbg062746; Tue, 20 Jun 2006 20:37:18 GMT (envelope-from jhb) Message-Id: <200606202037.k5KKbIbg062746@repoman.freebsd.org> From: John Baldwin Date: Tue, 20 Jun 2006 20:37:18 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern kern_linker.c src/sys/sys linker.h src/sys/compat/ndis subr_ndis.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2006 20:37:18 -0000 jhb 2006-06-20 20:37:18 UTC FreeBSD src repository Modified files: sys/kern kern_linker.c sys/sys linker.h sys/compat/ndis subr_ndis.c Log: - Add a new linker_file_foreach() function that walks the list of linker file objects calling a user-specified predicate function on each object. The iteration terminates either when the entire list has been iterated over or the predicate function returns a non-zero value. linker_file_foreach() returns the value returned by the last invocation of the predicate function. It also accepts a void * context pointer that is passed to the predicate function as well. Using an iterator function avoids exposing linker internals to the rest of the kernel making locking simpler. - Use linker_file_foreach() instead of walking the list of linker files manually to lookup ndis files in ndis(4). - Use linker_file_foreach() to implement linker_hwpmc_list_objects(). Revision Changes Path 1.105 +31 -19 src/sys/compat/ndis/subr_ndis.c 1.131 +52 -28 src/sys/kern/kern_linker.c 1.43 +12 -0 src/sys/sys/linker.h