svn commit: r213511 - stable/8/sys/kern
David Xu
davidxu at FreeBSD.org
Thu Oct 7 12:20:50 UTC 2010
Author: davidxu
Date: Thu Oct 7 12:20:50 2010
New Revision: 213511
URL: http://svn.freebsd.org/changeset/base/213511
Log:
MFC r213258:
- kern_sched_rr_get_interval should return interval for thread 1 in
target process.
- eliminate a goto.
Modified:
stable/8/sys/kern/p1003_1b.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/kern/p1003_1b.c
==============================================================================
--- stable/8/sys/kern/p1003_1b.c Thu Oct 7 09:30:35 2010 (r213510)
+++ stable/8/sys/kern/p1003_1b.c Thu Oct 7 12:20:50 2010 (r213511)
@@ -219,10 +219,8 @@ sched_getscheduler(struct thread *td, st
PROC_LOCK(targetp);
} else {
targetp = pfind(uap->pid);
- if (targetp == NULL) {
- e = ESRCH;
- goto done2;
- }
+ if (targetp == NULL)
+ return (ESRCH);
targettd = FIRST_THREAD_IN_PROC(targetp);
}
@@ -233,7 +231,6 @@ sched_getscheduler(struct thread *td, st
}
PROC_UNLOCK(targetp);
-done2:
return (e);
}
@@ -293,13 +290,10 @@ kern_sched_rr_get_interval(struct thread
targetp = td->td_proc;
PROC_LOCK(targetp);
} else {
- targetp = td->td_proc;
- PROC_LOCK(targetp);
- targettd = thread_find(targetp, pid);
- if (targettd == NULL) {
- PROC_UNLOCK(targetp);
+ targetp = pfind(pid);
+ if (targetp == NULL)
return (ESRCH);
- }
+ targettd = FIRST_THREAD_IN_PROC(targetp);
}
e = p_cansee(td, targetp);
More information about the svn-src-stable
mailing list