From owner-p4-projects Sat Nov 16 21:51:52 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 54D8137B404; Sat, 16 Nov 2002 21:51:49 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E489E37B401 for ; Sat, 16 Nov 2002 21:51:48 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9ABC243E75 for ; Sat, 16 Nov 2002 21:51:48 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gAH5n2mV032781 for ; Sat, 16 Nov 2002 21:49:02 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gAH5n2S3032775 for perforce@freebsd.org; Sat, 16 Nov 2002 21:49:02 -0800 (PST) Date: Sat, 16 Nov 2002 21:49:02 -0800 (PST) Message-Id: <200211170549.gAH5n2S3032775@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 21136 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=21136 Change 21136 by rwatson@rwatson_paprika on 2002/11/16 21:48:47 Avoid using curthread in situations where we actually do have thread pointer passed in; this avoids the PCPU cost, as well as preventing confusion by the reader regarding why curthread and the passed thread might be different (as well as being more consistent with other use of the thread in the same function). Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_linker.c#18 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_linker.c#18 (text+ko) ==== @@ -832,7 +832,7 @@ int error = 0; #ifdef MAC - error = mac_check_kld_stat(curthread->td_ucred); + error = mac_check_kld_stat(td->td_ucred); if (error) return (error); #endif @@ -868,7 +868,7 @@ int error = 0; #ifdef MAC - error = mac_check_kld_stat(curthread->td_ucred); + error = mac_check_kld_stat(td->td_ucred); if (error) return (error); #endif @@ -909,7 +909,7 @@ struct kld_file_stat *stat; #ifdef MAC - error = mac_check_kld_stat(curthread->td_ucred); + error = mac_check_kld_stat(td->td_ucred); if (error) return (error); #endif @@ -964,7 +964,7 @@ int error = 0; #ifdef MAC - error = mac_check_kld_stat(curthread->td_ucred); + error = mac_check_kld_stat(td->td_ucred); if (error) return (error); #endif @@ -999,7 +999,7 @@ int error = 0; #ifdef MAC - error = mac_check_kld_stat(curthread->td_ucred); + error = mac_check_kld_stat(td->td_ucred); if (error) return (error); #endif @@ -1838,7 +1838,7 @@ int error; #ifdef MAC - error = mac_check_kld_stat(curthread->td_ucred); + error = mac_check_kld_stat(req->td->td_ucred); if (error) return (error); #endif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message