Deleted Added
full compact
kern_timeout.c (296320) kern_timeout.c (298649)
1/*-
2 * Copyright (c) 1982, 1986, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 21 unchanged lines hidden (view full) ---

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * From: @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 21 unchanged lines hidden (view full) ---

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * From: @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/kern_timeout.c 296320 2016-03-02 18:46:17Z kib $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_timeout.c 298649 2016-04-26 15:38:17Z pfg $");
39
40#include "opt_callout_profiling.h"
41#if defined(__arm__)
42#include "opt_timer.h"
43#endif
44#include "opt_rss.h"
45
46#include <sys/param.h>

--- 1412 unchanged lines hidden (view full) ---

1459 * How many ticks were we asleep?
1460 * (stolen from tvtohz()).
1461 */
1462
1463 /* Don't do anything */
1464 if (time_change->tv_sec < 0)
1465 return;
1466 else if (time_change->tv_sec <= LONG_MAX / 1000000)
39
40#include "opt_callout_profiling.h"
41#if defined(__arm__)
42#include "opt_timer.h"
43#endif
44#include "opt_rss.h"
45
46#include <sys/param.h>

--- 1412 unchanged lines hidden (view full) ---

1459 * How many ticks were we asleep?
1460 * (stolen from tvtohz()).
1461 */
1462
1463 /* Don't do anything */
1464 if (time_change->tv_sec < 0)
1465 return;
1466 else if (time_change->tv_sec <= LONG_MAX / 1000000)
1467 delta_ticks = (time_change->tv_sec * 1000000 +
1468 time_change->tv_usec + (tick - 1)) / tick + 1;
1467 delta_ticks = howmany(time_change->tv_sec * 1000000 +
1468 time_change->tv_usec, tick) + 1;
1469 else if (time_change->tv_sec <= LONG_MAX / hz)
1470 delta_ticks = time_change->tv_sec * hz +
1469 else if (time_change->tv_sec <= LONG_MAX / hz)
1470 delta_ticks = time_change->tv_sec * hz +
1471 (time_change->tv_usec + (tick - 1)) / tick + 1;
1471 howmany(time_change->tv_usec, tick) + 1;
1472 else
1473 delta_ticks = LONG_MAX;
1474
1475 if (delta_ticks > INT_MAX)
1476 delta_ticks = INT_MAX;
1477
1478 /*
1479 * Now rip through the timer calltodo list looking for timers

--- 138 unchanged lines hidden ---
1472 else
1473 delta_ticks = LONG_MAX;
1474
1475 if (delta_ticks > INT_MAX)
1476 delta_ticks = INT_MAX;
1477
1478 /*
1479 * Now rip through the timer calltodo list looking for timers

--- 138 unchanged lines hidden ---