From b6d6774e76bd44035dc47ff6e7c3fdb44961a142 Mon Sep 17 00:00:00 2001 From: jhb Date: Sun, 19 May 2002 00:14:50 +0000 Subject: Change p_can{debug,see,sched,signal}()'s first argument to be a thread pointer instead of a proc pointer and require the process pointed to by the second argument to be locked. We now use the thread ucred reference for the credential checks in p_can*() as a result. p_canfoo() should now no longer need Giant. --- sys/posix4/p1003_1b.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/posix4') diff --git a/sys/posix4/p1003_1b.c b/sys/posix4/p1003_1b.c index e6bad42..9e6fdca 100644 --- a/sys/posix4/p1003_1b.c +++ b/sys/posix4/p1003_1b.c @@ -131,7 +131,7 @@ int sched_setparam(struct thread *td, targettd = FIRST_THREAD_IN_PROC(targetp); /* XXXKSE */ } - e = p_cansched(td->td_proc, targetp); + e = p_cansched(td, targetp); PROC_UNLOCK(targetp); if (e == 0) { e = ksched_setparam(&td->td_retval[0], ksched, targettd, @@ -167,7 +167,7 @@ int sched_getparam(struct thread *td, targettd = FIRST_THREAD_IN_PROC(targetp); /* XXXKSE */ } - e = p_cansee(td->td_proc, targetp); + e = p_cansee(td, targetp); PROC_UNLOCK(targetp); if (e) goto done2; @@ -209,7 +209,7 @@ int sched_setscheduler(struct thread *td, targettd = FIRST_THREAD_IN_PROC(targetp); /* XXXKSE */ } - e = p_cansched(td->td_proc, targetp); + e = p_cansched(td, targetp); PROC_UNLOCK(targetp); if (e == 0) { e = ksched_setscheduler(&td->td_retval[0], ksched, targettd, @@ -244,7 +244,7 @@ int sched_getscheduler(struct thread *td, targettd = FIRST_THREAD_IN_PROC(targetp); /* XXXKSE */ } - e = p_cansee(td->td_proc, targetp); + e = p_cansee(td, targetp); PROC_UNLOCK(targetp); if (e == 0) e = ksched_getscheduler(&td->td_retval[0], ksched, targettd); @@ -320,7 +320,7 @@ int sched_rr_get_interval(struct thread *td, targettd = FIRST_THREAD_IN_PROC(targetp); /* XXXKSE */ } - e = p_cansee(td->td_proc, targetp); + e = p_cansee(td, targetp); PROC_UNLOCK(targetp); if (e == 0) { e = ksched_rr_get_interval(&td->td_retval[0], ksched, targettd, -- cgit v1.1