summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4/svr4_resource.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
committerjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
commit5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch)
treeb1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/compat/svr4/svr4_resource.c
parent83e00d4274950d2b531c24692cd123538ffbddb9 (diff)
downloadFreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip
FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/compat/svr4/svr4_resource.c')
-rw-r--r--sys/compat/svr4/svr4_resource.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/compat/svr4/svr4_resource.c b/sys/compat/svr4/svr4_resource.c
index 2b52140..976475d 100644
--- a/sys/compat/svr4/svr4_resource.c
+++ b/sys/compat/svr4/svr4_resource.c
@@ -128,8 +128,8 @@ svr4_to_native_rl(rl)
((svr4_rlim64_t)(l)) != SVR4_RLIM64_SAVED_MAX)
int
-svr4_sys_getrlimit(p, uap)
- register struct proc *p;
+svr4_sys_getrlimit(td, uap)
+ register struct thread *td;
struct svr4_sys_getrlimit_args *uap;
{
int rl = svr4_to_native_rl(SCARG(uap, which));
@@ -141,7 +141,7 @@ svr4_sys_getrlimit(p, uap)
/* For p_rlimit. */
mtx_assert(&Giant, MA_OWNED);
- blim = p->p_rlimit[rl];
+ blim = td->td_proc->p_rlimit[rl];
/*
* Our infinity, is their maxfiles.
@@ -175,8 +175,8 @@ svr4_sys_getrlimit(p, uap)
int
-svr4_sys_setrlimit(p, uap)
- register struct proc *p;
+svr4_sys_setrlimit(td, uap)
+ register struct thread *td;
struct svr4_sys_setrlimit_args *uap;
{
int rl = svr4_to_native_rl(SCARG(uap, which));
@@ -189,7 +189,7 @@ svr4_sys_setrlimit(p, uap)
/* For p_rlimit. */
mtx_assert(&Giant, MA_OWNED);
- limp = &p->p_rlimit[rl];
+ limp = &td->td_proc->p_rlimit[rl];
if ((error = copyin(SCARG(uap, rlp), &slim, sizeof(slim))) != 0)
return error;
@@ -221,13 +221,13 @@ svr4_sys_setrlimit(p, uap)
else if (slim.rlim_cur == SVR4_RLIM_SAVED_CUR)
blim.rlim_cur = limp->rlim_cur;
- return dosetrlimit(p, rl, &blim);
+ return dosetrlimit(td, rl, &blim);
}
int
-svr4_sys_getrlimit64(p, uap)
- register struct proc *p;
+svr4_sys_getrlimit64(td, uap)
+ register struct thread *td;
struct svr4_sys_getrlimit64_args *uap;
{
int rl = svr4_to_native_rl(SCARG(uap, which));
@@ -239,7 +239,7 @@ svr4_sys_getrlimit64(p, uap)
/* For p_rlimit. */
mtx_assert(&Giant, MA_OWNED);
- blim = p->p_rlimit[rl];
+ blim = td->td_proc->p_rlimit[rl];
/*
* Our infinity, is their maxfiles.
@@ -273,8 +273,8 @@ svr4_sys_getrlimit64(p, uap)
int
-svr4_sys_setrlimit64(p, uap)
- register struct proc *p;
+svr4_sys_setrlimit64(td, uap)
+ register struct thread *td;
struct svr4_sys_setrlimit64_args *uap;
{
int rl = svr4_to_native_rl(SCARG(uap, which));
@@ -287,7 +287,7 @@ svr4_sys_setrlimit64(p, uap)
/* For p_rlimit. */
mtx_assert(&Giant, MA_OWNED);
- limp = &p->p_rlimit[rl];
+ limp = &td->td_proc->p_rlimit[rl];
if ((error = copyin(SCARG(uap, rlp), &slim, sizeof(slim))) != 0)
return error;
@@ -319,5 +319,5 @@ svr4_sys_setrlimit64(p, uap)
else if (slim.rlim_cur == SVR4_RLIM64_SAVED_CUR)
blim.rlim_cur = limp->rlim_cur;
- return dosetrlimit(p, rl, &blim);
+ return dosetrlimit(td, rl, &blim);
}
OpenPOWER on IntegriCloud