Lines Matching defs:tsp

204 	xcalwd_state_t	*tsp;
210 tsp = ddi_get_soft_state(xcalwd_statep, instance);
211 if (tsp == NULL)
214 *resultp = tsp->dip;
232 xcalwd_state_t *tsp;
250 tsp = ddi_get_soft_state(xcalwd_statep, instance);
251 if (tsp == NULL) {
263 mutex_init(&tsp->lock, NULL, MUTEX_DRIVER, NULL);
264 tsp->started = B_FALSE;
265 tsp->intvl = 0;
266 tsp->tid = 0;
267 tsp->dip = dip;
282 xcalwd_state_t *tsp;
288 tsp = ddi_get_soft_state(xcalwd_statep, instance);
290 mutex_destroy(&tsp->lock);
309 xcalwd_state_t *tsp;
314 tsp = ddi_get_soft_state(xcalwd_statep, instance);
315 if (tsp == NULL)
318 mutex_enter(&tsp->lock);
319 if (tsp->started == B_FALSE || tsp->tid == 0) {
320 tsp->tid = 0;
321 mutex_exit(&tsp->lock);
324 mutex_exit(&tsp->lock);
356 xcalwd_state_t *tsp;
363 tsp = ddi_get_soft_state(xcalwd_statep, instance);
364 if (tsp == NULL)
367 mutex_enter(&tsp->lock);
368 if (tsp->started == B_FALSE) {
369 tsp->tid = 0;
370 mutex_exit(&tsp->lock);
377 tsp->started = B_FALSE;
378 tid = tsp->tid;
379 tsp->tid = 0;
380 mutex_exit(&tsp->lock);
402 xcalwd_state_t *tsp;
415 tsp = ddi_get_soft_state(xcalwd_statep, instance);
416 if (tsp == NULL)
425 mutex_enter(&tsp->lock);
426 if (tsp->started == B_FALSE) {
427 mutex_exit(&tsp->lock);
430 tid = tsp->tid;
431 tsp->started = B_FALSE;
432 tsp->tid = 0;
433 mutex_exit(&tsp->lock);
443 mutex_enter(&tsp->lock);
444 o_intvl = tsp->intvl;
445 mutex_exit(&tsp->lock);
451 mutex_enter(&tsp->lock);
452 if (tsp->started == B_TRUE) {
453 mutex_exit(&tsp->lock);
456 tsp->intvl = intvl;
457 tsp->tid = realtime_timeout(xcalwd_timeout,
459 drv_usectohz(1000000) * tsp->intvl);
460 tsp->started = B_TRUE;
461 mutex_exit(&tsp->lock);
465 mutex_enter(&tsp->lock);
466 tid = tsp->tid;
467 tsp->tid = 0;
468 mutex_exit(&tsp->lock);
472 mutex_enter(&tsp->lock);
473 if (tsp->started == B_TRUE) /* reinstate */
474 tsp->tid = realtime_timeout(xcalwd_timeout,
476 drv_usectohz(1000000) * tsp->intvl);
477 mutex_exit(&tsp->lock);
480 mutex_enter(&tsp->lock);
481 curstate = tsp->started;
482 mutex_exit(&tsp->lock);