PERFORCE change 21136 for review

Robert Watson rwatson at freebsd.org
Sun Nov 17 05:49:02 GMT 2002


http://perforce.freebsd.org/chv.cgi?CH=21136

Change 21136 by rwatson at 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list