Change p_cpulimit to be in seconds instead of microseconds. Since

p_runtime now is a bintime, it is no longer an optimization to store
p_cpulimit as microseconds.

Suggested by:	phk
This commit is contained in:
jhb 2002-09-30 21:08:38 +00:00
parent 5d5060bddf
commit f72526c16f
2 changed files with 2 additions and 3 deletions

View File

@ -568,8 +568,7 @@ dosetrlimit(td, which, limp)
if (limp->rlim_cur > RLIM_INFINITY / (rlim_t)1000000)
p->p_limit->p_cpulimit = RLIM_INFINITY;
else
p->p_limit->p_cpulimit =
(rlim_t)1000000 * limp->rlim_cur;
p->p_limit->p_cpulimit = limp->rlim_cur;
break;
case RLIMIT_DATA:
if (limp->rlim_cur > maxdsiz)

View File

@ -82,7 +82,7 @@ struct plimit {
#define PL_SHAREMOD 0x01 /* modifications are shared */
int p_lflags;
int p_refcnt; /* number of references */
rlim_t p_cpulimit; /* current cpu limit in usec */
rlim_t p_cpulimit; /* current cpu limit in sec */
};
#ifdef _KERNEL