Print this page
XXXX introduce drv_sectohz


 563                 PMD(PMD_SX, ("Not waiting for AUTOSX ack\n"))
 564                 return;
 565         }
 566         ASSERT(type == SRN_TYPE_APM);
 567         /* otherwise wait for acks */
 568 restart:
 569         /*
 570          * We wait until all of the pending events are cleared.
 571          * We have to start over every time we do a cv_wait because
 572          * we give up the mutex and can be re-entered
 573          */
 574         for (clone = 1; clone < SRN_MAX_CLONE; clone++) {
 575                 if (srn.srn_clones[clone] == 0 ||
 576                     srn.srn_type[clone] != SRN_TYPE_APM)
 577                         continue;
 578                 if (srn.srn_pending[clone].ae_type && !srn.srn_fault[clone]) {
 579                         PMD(PMD_SX, ("srn_notify waiting for ack for clone %d, "
 580                             "event %x\n", clone, event))
 581                         if (cv_timedwait(&srn_clones_cv[clone],
 582                             &srn_clone_lock, ddi_get_lbolt() +
 583                             drv_usectohz(srn_timeout * 1000000)) == -1) {
 584                                 /*
 585                                  * Client didn't respond, mark it as faulted
 586                                  * and continue as if a regular signal.
 587                                  */
 588                                 PMD(PMD_SX, ("srn_notify: clone %d did not "
 589                                     "ack event %x\n", clone, event))
 590                                 cmn_err(CE_WARN, "srn_notify: clone %d did "
 591                                     "not ack event %x\n", clone, event);
 592                                 srn.srn_fault[clone] = 1;
 593                         }
 594                         goto restart;
 595                 }
 596         }
 597         PMD(PMD_SX, ("srn_notify done with %x\n", event))
 598 }


 563                 PMD(PMD_SX, ("Not waiting for AUTOSX ack\n"))
 564                 return;
 565         }
 566         ASSERT(type == SRN_TYPE_APM);
 567         /* otherwise wait for acks */
 568 restart:
 569         /*
 570          * We wait until all of the pending events are cleared.
 571          * We have to start over every time we do a cv_wait because
 572          * we give up the mutex and can be re-entered
 573          */
 574         for (clone = 1; clone < SRN_MAX_CLONE; clone++) {
 575                 if (srn.srn_clones[clone] == 0 ||
 576                     srn.srn_type[clone] != SRN_TYPE_APM)
 577                         continue;
 578                 if (srn.srn_pending[clone].ae_type && !srn.srn_fault[clone]) {
 579                         PMD(PMD_SX, ("srn_notify waiting for ack for clone %d, "
 580                             "event %x\n", clone, event))
 581                         if (cv_timedwait(&srn_clones_cv[clone],
 582                             &srn_clone_lock, ddi_get_lbolt() +
 583                             drv_sectohz(srn_timeout)) == -1) {
 584                                 /*
 585                                  * Client didn't respond, mark it as faulted
 586                                  * and continue as if a regular signal.
 587                                  */
 588                                 PMD(PMD_SX, ("srn_notify: clone %d did not "
 589                                     "ack event %x\n", clone, event))
 590                                 cmn_err(CE_WARN, "srn_notify: clone %d did "
 591                                     "not ack event %x\n", clone, event);
 592                                 srn.srn_fault[clone] = 1;
 593                         }
 594                         goto restart;
 595                 }
 596         }
 597         PMD(PMD_SX, ("srn_notify done with %x\n", event))
 598 }