- Don't let SCHED_TICK_TOTAL() return less than hz. This can cause integer

divide faults in roundup() later if it is able to return 0.  For some
   reason this bug only shows up on my laptop and not my testboxes.
This commit is contained in:
Jeff Roberson 2007-01-06 12:33:43 +00:00
parent 1d6328e12b
commit eddb4efacd

View File

@ -110,7 +110,7 @@ static struct td_sched td_sched0;
#define SCHED_TICK_MAX (SCHED_TICK_TARG + hz)
#define SCHED_TICK_SHIFT 10
#define SCHED_TICK_HZ(ts) ((ts)->ts_ticks >> SCHED_TICK_SHIFT)
#define SCHED_TICK_TOTAL(ts) ((ts)->ts_ltick - (ts)->ts_ftick)
#define SCHED_TICK_TOTAL(ts) (max((ts)->ts_ltick - (ts)->ts_ftick, hz))
/*
* These macros determine priorities for non-interactive threads. They are