kernel: remove global balancetime variable -> make function static

This commit is contained in:
cinap_lenrek 2024-07-23 21:03:08 +00:00
parent 4a7c44fee4
commit 8a6c61c8ef

View file

@ -555,20 +555,19 @@ yield(void)
* since priorities will otherwise only be recalculated when
* the running process blocks.
*/
ulong balancetime;
static void
rebalance(void)
{
static ulong lasttime;
int pri, npri;
Schedq *rq;
Proc *p;
ulong t;
t = m->ticks;
if(t - balancetime < HZ)
if(t - lasttime < HZ)
return;
balancetime = t;
lasttime = t;
assert(!islo());