1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

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:
John Baldwin 2002-09-30 21:08:38 +00:00
parent 0626774f08
commit f4cd8f9ff4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104239
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