mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
The pessimistic rounding in hzto() was too pessimistic for realitimexpire().
This commit is contained in:
parent
4ebf8117df
commit
9207f00ac0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9327
@ -31,7 +31,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)kern_time.c 8.1 (Berkeley) 6/10/93
|
* @(#)kern_time.c 8.1 (Berkeley) 6/10/93
|
||||||
* $Id: kern_time.c,v 1.7 1995/03/16 18:12:38 bde Exp $
|
* $Id: kern_time.c,v 1.8 1995/05/30 08:05:47 rgrimes Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -295,6 +295,10 @@ setitimer(p, uap, retval)
|
|||||||
* Else compute next time timer should go off which is > current time.
|
* Else compute next time timer should go off which is > current time.
|
||||||
* This is where delay in processing this timeout causes multiple
|
* This is where delay in processing this timeout causes multiple
|
||||||
* SIGALRM calls to be compressed into one.
|
* SIGALRM calls to be compressed into one.
|
||||||
|
* hzto() always adds 1 to allow for the time until the next clock
|
||||||
|
* interrupt being strictly less than 1 clock tick, but we don't want
|
||||||
|
* that here since we want to appear to be in sync with the clock
|
||||||
|
* interrupt even when we're delayed.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
realitexpire(arg)
|
realitexpire(arg)
|
||||||
@ -315,7 +319,7 @@ realitexpire(arg)
|
|||||||
&p->p_realtimer.it_interval);
|
&p->p_realtimer.it_interval);
|
||||||
if (timercmp(&p->p_realtimer.it_value, &time, >)) {
|
if (timercmp(&p->p_realtimer.it_value, &time, >)) {
|
||||||
timeout(realitexpire, (caddr_t)p,
|
timeout(realitexpire, (caddr_t)p,
|
||||||
hzto(&p->p_realtimer.it_value));
|
hzto(&p->p_realtimer.it_value) - 1);
|
||||||
splx(s);
|
splx(s);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user