Print this page
XXXX introduce drv_sectohz
*** 985,995 ****
p->cku_err.re_status = RPC_CANTCONNECT;
p->cku_err.re_errno = EIO;
break;
}
if (delay_first == TRUE)
! ticks = clnt_cots_min_tout * drv_usectohz(1000000);
goto cots_done;
}
/*
* If we've never sent any request on this connection (send count
--- 985,995 ----
p->cku_err.re_status = RPC_CANTCONNECT;
p->cku_err.re_errno = EIO;
break;
}
if (delay_first == TRUE)
! ticks = drv_sectohz(clnt_cots_min_tout);
goto cots_done;
}
/*
* If we've never sent any request on this connection (send count
*** 1117,1127 ****
if ((waitsecs++ < max_waitsecs) &&
!(zone_status_get(curproc->p_zone) >=
ZONE_IS_SHUTTING_DOWN)) {
/* wait 1 sec for queue to drain */
! if (clnt_delay(drv_usectohz(1000000),
h->cl_nosignal) == EINTR) {
p->cku_err.re_errno = EINTR;
p->cku_err.re_status = RPC_INTR;
goto cots_done;
--- 1117,1127 ----
if ((waitsecs++ < max_waitsecs) &&
!(zone_status_get(curproc->p_zone) >=
ZONE_IS_SHUTTING_DOWN)) {
/* wait 1 sec for queue to drain */
! if (clnt_delay(drv_sectohz(1),
h->cl_nosignal) == EINTR) {
p->cku_err.re_errno = EINTR;
p->cku_err.re_status = RPC_INTR;
goto cots_done;
*** 1181,1191 ****
if (lwp != NULL)
lwp->lwp_nostop++;
oldlbolt = ddi_get_lbolt();
! timout = wait.tv_sec * drv_usectohz(1000000) +
drv_usectohz(wait.tv_usec) + oldlbolt;
/*
* Iterate until the call_status is changed to something
* other that RPC_TIMEDOUT, or if cv_timedwait_sig() returns
* something <=0 zero. The latter means that we timed
--- 1181,1191 ----
if (lwp != NULL)
lwp->lwp_nostop++;
oldlbolt = ddi_get_lbolt();
! timout = drv_sectohz(wait.tv_sec) +
drv_usectohz(wait.tv_usec) + oldlbolt;
/*
* Iterate until the call_status is changed to something
* other that RPC_TIMEDOUT, or if cv_timedwait_sig() returns
* something <=0 zero. The latter means that we timed
*** 1230,1241 ****
if (call->call_status != RPC_SUCCESS) {
clock_t curlbolt;
clock_t diff;
curlbolt = ddi_get_lbolt();
! ticks = clnt_cots_min_tout *
! drv_usectohz(1000000);
diff = curlbolt - oldlbolt;
if (diff < ticks) {
delay_first = TRUE;
if (diff > 0)
ticks -= diff;
--- 1230,1240 ----
if (call->call_status != RPC_SUCCESS) {
clock_t curlbolt;
clock_t diff;
curlbolt = ddi_get_lbolt();
! ticks = drv_sectohz(clnt_cots_min_tout);
diff = curlbolt - oldlbolt;
if (diff < ticks) {
delay_first = TRUE;
if (diff > 0)
ticks -= diff;
*** 1713,1723 ****
* a signal(0) or timeout(-1) or cv_signal(>0). But it may be
* cv_signalled for various other reasons too. So loop
* until there is a state change on the connection.
*/
! timout = waitp->tv_sec * drv_usectohz(1000000) +
drv_usectohz(waitp->tv_usec) + ddi_get_lbolt();
if (nosignal) {
while ((cv_stat = cv_timedwait(&cm_entry->x_conn_cv,
&connmgr_lock, timout)) > 0 &&
--- 1712,1722 ----
* a signal(0) or timeout(-1) or cv_signal(>0). But it may be
* cv_signalled for various other reasons too. So loop
* until there is a state change on the connection.
*/
! timout = drv_sectohz(waitp->tv_sec) +
drv_usectohz(waitp->tv_usec) + ddi_get_lbolt();
if (nosignal) {
while ((cv_stat = cv_timedwait(&cm_entry->x_conn_cv,
&connmgr_lock, timout)) > 0 &&
*** 2351,2361 ****
while (cm_entry->x_needrel == TRUE) {
cm_entry->x_needrel = FALSE;
connmgr_sndrel(cm_entry);
! delay(drv_usectohz(1000000));
mutex_enter(&connmgr_lock);
}
/*
--- 2350,2360 ----
while (cm_entry->x_needrel == TRUE) {
cm_entry->x_needrel = FALSE;
connmgr_sndrel(cm_entry);
! delay(drv_sectohz(1));
mutex_enter(&connmgr_lock);
}
/*
*** 2467,2477 ****
RPCLOG(8, "connmgr_dis_and_wait waiting for "
"T_DISCON_REQ's ACK for connection %p\n",
(void *)cm_entry);
! timout = clnt_cots_min_conntout * drv_usectohz(1000000);
/*
* The TPI spec says that the T_DISCON_REQ
* will get acknowledged, but in practice
* the ACK may never get sent. So don't
--- 2466,2476 ----
RPCLOG(8, "connmgr_dis_and_wait waiting for "
"T_DISCON_REQ's ACK for connection %p\n",
(void *)cm_entry);
! timout = drv_sectohz(clnt_cots_min_conntout);
/*
* The TPI spec says that the T_DISCON_REQ
* will get acknowledged, but in practice
* the ACK may never get sent. So don't
*** 3706,3716 ****
int cv_stat = 1;
ASSERT(MUTEX_HELD(&clnt_pending_lock));
while (e->call_reply == NULL) {
if (waitp != NULL) {
! timout = waitp->tv_sec * drv_usectohz(MICROSEC) +
drv_usectohz(waitp->tv_usec);
if (nosignal)
cv_stat = cv_reltimedwait(&e->call_cv,
&clnt_pending_lock, timout, TR_CLOCK_TICK);
else
--- 3705,3715 ----
int cv_stat = 1;
ASSERT(MUTEX_HELD(&clnt_pending_lock));
while (e->call_reply == NULL) {
if (waitp != NULL) {
! timout = drv_sectohz(waitp->tv_sec) +
drv_usectohz(waitp->tv_usec);
if (nosignal)
cv_stat = cv_reltimedwait(&e->call_cv,
&clnt_pending_lock, timout, TR_CLOCK_TICK);
else