Print this page
OS-5566 ppoll timeout calculation can overflow
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Alex Wilson <alex.wilson@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>

*** 13,22 **** --- 13,23 ---- * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright 2016 Joyent, Inc. */ /* * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */
*** 259,268 **** --- 260,277 ---- */ typedef longlong_t hrtime_t; #if defined(_KERNEL) || defined(_FAKE_KERNEL) + /* + * Unsigned counterpart to hrtime_t + */ + typedef u_longlong_t uhrtime_t; + + #define HRTIME_MAX LLONG_MAX + #define UHRTIME_MAX ULLONG_MAX + #include <sys/time_impl.h> #include <sys/mutex.h> extern int tick_per_msec; /* clock ticks per millisecond (may be zero) */ extern int msec_per_tick; /* milliseconds per clock tick (may be zero) */