diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/cmd-inet/sbin/dhcpagent/init_reboot.c | 5 | ||||
-rw-r--r-- | usr/src/cmd/cmd-inet/usr.lib/in.mpathd/mpd_probe.c | 2 | ||||
-rw-r--r-- | usr/src/cmd/cmd-inet/usr.sbin/ipmpstat/ipmpstat.c | 2 | ||||
-rw-r--r-- | usr/src/cmd/idmap/idmapd/dbutils.c | 2 | ||||
-rw-r--r-- | usr/src/cmd/mdb/common/modules/svc.configd/configd.c | 6 | ||||
-rw-r--r-- | usr/src/cmd/rcap/rcapd/rcapd_main.c | 4 | ||||
-rw-r--r-- | usr/src/cmd/rcap/rcapstat/rcapstat.c | 4 | ||||
-rw-r--r-- | usr/src/cmd/zlogin/zlogin.c | 2 | ||||
-rw-r--r-- | usr/src/lib/libdhcpagent/common/dhcpagent_ipc.c | 2 | ||||
-rw-r--r-- | usr/src/lib/libdlpi/common/libdlpi.c | 4 | ||||
-rw-r--r-- | usr/src/lib/libinetutil/common/tq.c | 2 | ||||
-rw-r--r-- | usr/src/lib/libldap5/sources/ldap/common/os-ip.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/dtrace/dtrace.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/inet/ip/ip.c | 8 | ||||
-rw-r--r-- | usr/src/uts/common/io/devpoll.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/io/power.c | 2 | ||||
-rw-r--r-- | usr/src/uts/sun4u/io/todds1287.c | 2 |
17 files changed, 25 insertions, 30 deletions
diff --git a/usr/src/cmd/cmd-inet/sbin/dhcpagent/init_reboot.c b/usr/src/cmd/cmd-inet/sbin/dhcpagent/init_reboot.c index 8c70c140f2..c239287e1d 100644 --- a/usr/src/cmd/cmd-inet/sbin/dhcpagent/init_reboot.c +++ b/usr/src/cmd/cmd-inet/sbin/dhcpagent/init_reboot.c @@ -237,9 +237,8 @@ stop_init_reboot(dhcp_smach_t *dsmp, unsigned int n_requests) if (dsmp->dsm_isv6) { uint_t nowabs, maxabs; - nowabs = gethrtime() / (NANOSEC / MILLISEC); - maxabs = dsmp->dsm_neg_hrtime / (NANOSEC / MILLISEC) + - DHCPV6_CNF_MAX_RD; + nowabs = NSEC2MSEC(gethrtime()); + maxabs = NSEC2MSEC(dsmp->dsm_neg_hrtime) + DHCPV6_CNF_MAX_RD; if (nowabs < maxabs) { /* Cap the timer based on the maximum */ if (nowabs + dsmp->dsm_send_timeout > maxabs) diff --git a/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/mpd_probe.c b/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/mpd_probe.c index 4876029d63..298bec923c 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/mpd_probe.c +++ b/usr/src/cmd/cmd-inet/usr.lib/in.mpathd/mpd_probe.c @@ -2726,7 +2726,7 @@ own_address(struct in6_addr addr) static int ns2ms(int64_t ns) { - return (ns / (NANOSEC / MILLISEC)); + return (NSEC2MSEC(ns)); } static int64_t diff --git a/usr/src/cmd/cmd-inet/usr.sbin/ipmpstat/ipmpstat.c b/usr/src/cmd/cmd-inet/usr.sbin/ipmpstat/ipmpstat.c index f5155e6745..c9cbade079 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/ipmpstat/ipmpstat.c +++ b/usr/src/cmd/cmd-inet/usr.sbin/ipmpstat/ipmpstat.c @@ -153,7 +153,7 @@ enum { }; #define IPMPSTAT_NCOL 80 -#define NS2FLOATMS(ns) ((float)(ns) / (NANOSEC / MILLISEC)) +#define NS2FLOATMS(ns) (NSEC2MSEC((float)(ns))) #define MS2FLOATSEC(ms) ((float)(ms) / 1000) static const char *progname; diff --git a/usr/src/cmd/idmap/idmapd/dbutils.c b/usr/src/cmd/idmap/idmapd/dbutils.c index 52f376f8f4..b868242728 100644 --- a/usr/src/cmd/idmap/idmapd/dbutils.c +++ b/usr/src/cmd/idmap/idmapd/dbutils.c @@ -356,7 +356,7 @@ idmap_sqlite_busy_handler(void *arg, const char *table_name, int count) } busy->total += delay; rqtp.tv_sec = 0; - rqtp.tv_nsec = delay * (NANOSEC / MILLISEC); + rqtp.tv_nsec = MSEC2NSEC(delay); (void) nanosleep(&rqtp, NULL); return (1); } diff --git a/usr/src/cmd/mdb/common/modules/svc.configd/configd.c b/usr/src/cmd/mdb/common/modules/svc.configd/configd.c index f143f60379..550d5e4928 100644 --- a/usr/src/cmd/mdb/common/modules/svc.configd/configd.c +++ b/usr/src/cmd/mdb/common/modules/svc.configd/configd.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <mdb/mdb_modapi.h> #include <mdb/mdb_ctf.h> @@ -258,7 +256,7 @@ request_log(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) else if (dursec <= 9999) mdb_snprintf(durstr, sizeof (durstr), "%lld.%03lld", - dursec, durnsec / (NANOSEC / MILLISEC)); + dursec, NSEC2MSEC(durnsec)); else mdb_snprintf(durstr, sizeof (durstr), "%lld", dursec); @@ -282,7 +280,7 @@ request_log(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) else if (dursec <= 99999999ULL) mdb_snprintf(stampstr, sizeof (stampstr), "-%lld.%03lld", - dursec, durnsec / (NANOSEC / MILLISEC)); + dursec, NSEC2MSEC(durnsec)); else mdb_snprintf(stampstr, sizeof (stampstr), "-%lld", dursec); diff --git a/usr/src/cmd/rcap/rcapd/rcapd_main.c b/usr/src/cmd/rcap/rcapd/rcapd_main.c index d18b2c9e04..4dda9818be 100644 --- a/usr/src/cmd/rcap/rcapd/rcapd_main.c +++ b/usr/src/cmd/rcap/rcapd/rcapd_main.c @@ -1045,8 +1045,8 @@ simple_report_collection_cb(lcollection_t *lcol, void *arg) (unsigned long long)lcol->lcol_rss_cap, (unsigned long long)(lcol->lcol_stat.lcols_proc_in - lcol->lcol_stat.lcols_proc_out), DELTA(lcols_proc_out), - DELTA(lcols_scan_count), DELTA(lcols_scan_time_complete) / (NANOSEC - / MILLISEC)); + DELTA(lcols_scan_count), + NSEC2MSEC(DELTA(lcols_scan_time_complete))); #undef DELTA diff --git a/usr/src/cmd/rcap/rcapstat/rcapstat.c b/usr/src/cmd/rcap/rcapstat/rcapstat.c index fb83f861ae..0632250fed 100644 --- a/usr/src/cmd/rcap/rcapstat/rcapstat.c +++ b/usr/src/cmd/rcap/rcapstat/rcapstat.c @@ -281,8 +281,8 @@ print_unformatted_stats(void) col->col_src_stat.lcols_max_rss, col->col_rsslimit, (col->col_src_stat.lcols_proc_in - col->col_old_stat.lcols_proc_out), DELTA(lcols_proc_out), - DELTA(lcols_scan_count), DELTA(lcols_scan_time_complete) / - (NANOSEC / MILLISEC)); + DELTA(lcols_scan_count), + NSEC2MSEC(DELTA(lcols_scan_time_complete))); col->col_old_stat = col->col_src_stat; col = col->col_next; diff --git a/usr/src/cmd/zlogin/zlogin.c b/usr/src/cmd/zlogin/zlogin.c index 9ca4675a4c..227e5dffcb 100644 --- a/usr/src/cmd/zlogin/zlogin.c +++ b/usr/src/cmd/zlogin/zlogin.c @@ -671,7 +671,7 @@ retry: /* sleep for 10 milliseconds */ rqtp.tv_sec = 0; - rqtp.tv_nsec = 10 * (NANOSEC / MILLISEC); + rqtp.tv_nsec = MSEC2NSEC(10); (void) nanosleep(&rqtp, NULL); if (!dead) goto retry; diff --git a/usr/src/lib/libdhcpagent/common/dhcpagent_ipc.c b/usr/src/lib/libdhcpagent/common/dhcpagent_ipc.c index e64268416f..c27b738b29 100644 --- a/usr/src/lib/libdhcpagent/common/dhcpagent_ipc.c +++ b/usr/src/lib/libdhcpagent/common/dhcpagent_ipc.c @@ -994,7 +994,7 @@ dhcp_ipc_timed_read(int fd, void *buffer, unsigned int length, int *msec) if (*msec != -1) { end = gethrtime(); - *msec -= (end - start) / (NANOSEC / MILLISEC); + *msec -= NSEC2MSEC(end - start); if (*msec < 0) *msec = 0; } diff --git a/usr/src/lib/libdlpi/common/libdlpi.c b/usr/src/lib/libdlpi/common/libdlpi.c index bda2648955..1a639a5db9 100644 --- a/usr/src/lib/libdlpi/common/libdlpi.c +++ b/usr/src/lib/libdlpi/common/libdlpi.c @@ -1339,7 +1339,7 @@ i_dlpi_strgetmsg(dlpi_impl_t *dip, int msec, dlpi_msg_t *dlreplyp, for (;;) { if (!infinite) - start = gethrtime() / (NANOSEC / MILLISEC); + start = NSEC2MSEC(gethrtime()); switch (poll(&pfd, 1, msec)) { default: @@ -1455,7 +1455,7 @@ i_dlpi_strgetmsg(dlpi_impl_t *dip, int msec, dlpi_msg_t *dlreplyp, } update_timer: if (!infinite) { - current = gethrtime() / (NANOSEC / MILLISEC); + current = NSEC2MSEC(gethrtime()); msec -= (current - start); if (msec <= 0) diff --git a/usr/src/lib/libinetutil/common/tq.c b/usr/src/lib/libinetutil/common/tq.c index e809b3289d..8ceb305406 100644 --- a/usr/src/lib/libinetutil/common/tq.c +++ b/usr/src/lib/libinetutil/common/tq.c @@ -95,7 +95,7 @@ insert_timer(iu_tq_t *tq, iu_timer_node_t *node, uint64_t msec) * is the last item on the list, which are very different cases). */ - node->iutn_abs_timeout = gethrtime() + (msec * (NANOSEC / MILLISEC)); + node->iutn_abs_timeout = gethrtime() + MSEC2NSEC(msec); if (tq->iutq_head != NULL && tq->iutq_head->iutn_abs_timeout < node->iutn_abs_timeout) diff --git a/usr/src/lib/libldap5/sources/ldap/common/os-ip.c b/usr/src/lib/libldap5/sources/ldap/common/os-ip.c index 00e9769cfa..4dd1f8d672 100644 --- a/usr/src/lib/libldap5/sources/ldap/common/os-ip.c +++ b/usr/src/lib/libldap5/sources/ldap/common/os-ip.c @@ -3,8 +3,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * The contents of this file are subject to the Netscape Public * License Version 1.1 (the "License"); you may not use this file @@ -317,7 +315,7 @@ nsldapi_os_connect_with_to(LBER_SOCKET sockfd, struct sockaddr *saptr, (msec % MILLISEC); #ifdef _SOLARIS_SDK start_time = gethrtime(); - tv_time = (hrtime_t)msec * (NANOSEC / MILLISEC); + tv_time = MSEC2NSEC(msec); #else start_time = (long)time(NULL); #endif diff --git a/usr/src/uts/common/dtrace/dtrace.c b/usr/src/uts/common/dtrace/dtrace.c index b9c5c1ddc7..00fbc0a0dd 100644 --- a/usr/src/uts/common/dtrace/dtrace.c +++ b/usr/src/uts/common/dtrace/dtrace.c @@ -139,7 +139,7 @@ dtrace_optval_t dtrace_ustackframes_default = 20; dtrace_optval_t dtrace_jstackframes_default = 50; dtrace_optval_t dtrace_jstackstrsize_default = 512; int dtrace_msgdsize_max = 128; -hrtime_t dtrace_chill_max = 500 * (NANOSEC / MILLISEC); /* 500 ms */ +hrtime_t dtrace_chill_max = MSEC2NSEC(500); /* 500 ms */ hrtime_t dtrace_chill_interval = NANOSEC; /* 1000 ms */ int dtrace_devdepth_max = 32; int dtrace_err_verbose; diff --git a/usr/src/uts/common/inet/ip/ip.c b/usr/src/uts/common/inet/ip/ip.c index 313c6120ed..4b65ec8a6d 100644 --- a/usr/src/uts/common/inet/ip/ip.c +++ b/usr/src/uts/common/inet/ip/ip.c @@ -1498,7 +1498,7 @@ icmp_inbound_v4(mblk_t *mp, ip_recv_attr_t *ira) /* Compute # of milliseconds since midnight */ gethrestime(&now); ts = (now.tv_sec % (24 * 60 * 60)) * 1000 + - now.tv_nsec / (NANOSEC / MILLISEC); + NSEC2MSEC(now.tv_nsec); *tsp++ = htonl(ts); /* Lay in 'receive time' */ *tsp++ = htonl(ts); /* Lay in 'send time' */ BUMP_MIB(&ipst->ips_icmp_mib, icmpOutTimestampReps); @@ -9117,7 +9117,7 @@ ip_forward_options(mblk_t *mp, ipha_t *ipha, ill_t *dst_ill, /* Compute # of milliseconds since midnight */ gethrestime(&now); ts = (now.tv_sec % (24 * 60 * 60)) * 1000 + - now.tv_nsec / (NANOSEC / MILLISEC); + NSEC2MSEC(now.tv_nsec); bcopy(&ts, (char *)opt + off, IPOPT_TS_TIMELEN); opt[IPOPT_OFFSET] += IPOPT_TS_TIMELEN; break; @@ -9343,7 +9343,7 @@ ip_input_local_options(mblk_t *mp, ipha_t *ipha, ip_recv_attr_t *ira) /* Compute # of milliseconds since midnight */ gethrestime(&now); ts = (now.tv_sec % (24 * 60 * 60)) * 1000 + - now.tv_nsec / (NANOSEC / MILLISEC); + NSEC2MSEC(now.tv_nsec); bcopy(&ts, (char *)opt + off, IPOPT_TS_TIMELEN); opt[IPOPT_OFFSET] += IPOPT_TS_TIMELEN; break; @@ -12025,7 +12025,7 @@ ip_output_local_options(ipha_t *ipha, ip_stack_t *ipst) /* Compute # of milliseconds since midnight */ gethrestime(&now); ts = (now.tv_sec % (24 * 60 * 60)) * 1000 + - now.tv_nsec / (NANOSEC / MILLISEC); + NSEC2MSEC(now.tv_nsec); bcopy(&ts, (char *)opt + off, IPOPT_TS_TIMELEN); opt[IPOPT_OFFSET] += IPOPT_TS_TIMELEN; break; diff --git a/usr/src/uts/common/io/devpoll.c b/usr/src/uts/common/io/devpoll.c index 7d311aaa10..a3fcbbba03 100644 --- a/usr/src/uts/common/io/devpoll.c +++ b/usr/src/uts/common/io/devpoll.c @@ -750,7 +750,7 @@ dpioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp, int *rvalp) * to absolute nanoseconds. They must wait for at * least a tick. */ - deadline = deadline * NANOSEC / MILLISEC; + deadline = MSEC2NSEC(deadline); deadline = MAX(deadline, nsec_per_tick); deadline += now; } diff --git a/usr/src/uts/common/io/power.c b/usr/src/uts/common/io/power.c index 61e675ba77..aed53f5334 100644 --- a/usr/src/uts/common/io/power.c +++ b/usr/src/uts/common/io/power.c @@ -116,7 +116,7 @@ static char hasEPIC = B_FALSE; static void *power_state; static int power_inst = -1; -static hrtime_t power_button_debounce = NANOSEC/MILLISEC*10; +static hrtime_t power_button_debounce = MSEC2NSEC(10); static hrtime_t power_button_abort_interval = 1.5 * NANOSEC; static int power_button_abort_presses = 3; static int power_button_abort_enable = 1; diff --git a/usr/src/uts/sun4u/io/todds1287.c b/usr/src/uts/sun4u/io/todds1287.c index be095bcb6f..35dc7ad8fc 100644 --- a/usr/src/uts/sun4u/io/todds1287.c +++ b/usr/src/uts/sun4u/io/todds1287.c @@ -158,7 +158,7 @@ static int instance = -1; /* Driver Tunables */ static int ds1287_interrupt_priority = 15; static int ds1287_softint_priority = 2; -static hrtime_t power_button_debounce = NANOSEC/MILLISEC*10; +static hrtime_t power_button_debounce = MSEC2NSEC(10); static hrtime_t power_button_abort_interval = 1.5 * NANOSEC; static int power_button_abort_presses = 3; static int power_button_abort_enable = 1; |