Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_hpts.h
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | |||||
static __inline uint64_t | static __inline uint64_t | ||||
tcp_tv_to_lusectick(const struct timeval *sv) | tcp_tv_to_lusectick(const struct timeval *sv) | ||||
{ | { | ||||
return ((uint64_t)((sv->tv_sec * HPTS_USEC_IN_SEC) + sv->tv_usec)); | return ((uint64_t)((sv->tv_sec * HPTS_USEC_IN_SEC) + sv->tv_usec)); | ||||
} | } | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
extern int32_t tcp_min_hptsi_time; | |||||
__inline int32_t | |||||
get_hpts_min_sleep_time() | |||||
{ | |||||
return (tcp_min_hptsi_time + HPTS_TICKS_PER_SLOT); | |||||
} | |||||
static __inline uint32_t | static __inline uint32_t | ||||
tcp_gethptstick(struct timeval *sv) | tcp_gethptstick(struct timeval *sv) | ||||
{ | { | ||||
struct timeval tv; | struct timeval tv; | ||||
if (sv == NULL) | if (sv == NULL) | ||||
sv = &tv; | sv = &tv; | ||||
microuptime(sv); | microuptime(sv); | ||||
Show All 16 Lines |