Hallo and thanks for getting engaged in this issue!
You're right and I must apologize. I tried to make variable names somewhat
easier
and forgot to change the last mstr_ptr->vv_mutex. So, unfortunately this is not
the problem.
The correct code would be:
mutex_enter(&ptr->mutex);
while (ptr->busy != 0) {
clock_t until;
(void) ddi_get_lbolt(); /* just call function, seems not to work at first
call */
until = ddi_get_lbolt() + drv_usectohz(tmo);
if (cv_timedwait(&ptr->cv, &ptr->mutex, until) == -1) {
mutex_exit(&ptr->mutex);
err = EAGAIN;
goto somewhere_else;
}
}
mutex_exit(&ptr->vv_mutex);
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code