Lines Matching refs:ct

554 #define	MDI_CLIENT_LOCK(ct)		mutex_enter(&(ct)->ct_mutex)
555 #define MDI_CLIENT_TRYLOCK(ct) mutex_tryenter(&(ct)->ct_mutex)
556 #define MDI_CLIENT_UNLOCK(ct) mutex_exit(&(ct)->ct_mutex)
558 #define MDI_CLIENT_LOCKED(ct) MUTEX_HELD(&(ct)->ct_mutex)
567 #define MDI_CLIENT_UNSTABLE(ct) (ct)->ct_unstable++;
568 #define MDI_CLIENT_STABLE(ct) { \
569 (ct)->ct_unstable--; \
570 if ((ct)->ct_unstable == 0) { \
571 cv_broadcast(&(ct)->ct_unstable_cv); \
589 #define MDI_CLIENT_SET_OFFLINE(ct) {\
590 ASSERT(MDI_CLIENT_LOCKED(ct)); \
591 (ct)->ct_flags |= MDI_CLIENT_FLAGS_OFFLINE; }
592 #define MDI_CLIENT_SET_ONLINE(ct) {\
593 ASSERT(MDI_CLIENT_LOCKED(ct)); \
594 (ct)->ct_flags &= ~MDI_CLIENT_FLAGS_OFFLINE; }
595 #define MDI_CLIENT_IS_OFFLINE(ct) \
596 ((ct)->ct_flags & MDI_CLIENT_FLAGS_OFFLINE)
598 #define MDI_CLIENT_SET_SUSPEND(ct) {\
599 ASSERT(MDI_CLIENT_LOCKED(ct)); \
600 (ct)->ct_flags |= MDI_CLIENT_FLAGS_SUSPEND; }
601 #define MDI_CLIENT_SET_RESUME(ct) {\
602 ASSERT(MDI_CLIENT_LOCKED(ct)); \
603 (ct)->ct_flags &= ~MDI_CLIENT_FLAGS_SUSPEND; }
604 #define MDI_CLIENT_IS_SUSPENDED(ct) \
605 ((ct)->ct_flags & MDI_CLIENT_FLAGS_SUSPEND)
607 #define MDI_CLIENT_SET_POWER_DOWN(ct) {\
608 ASSERT(MDI_CLIENT_LOCKED(ct)); \
609 (ct)->ct_flags |= MDI_CLIENT_FLAGS_POWER_DOWN; }
610 #define MDI_CLIENT_SET_POWER_UP(ct) {\
611 ASSERT(MDI_CLIENT_LOCKED(ct)); \
612 (ct)->ct_flags &= ~MDI_CLIENT_FLAGS_POWER_DOWN; }
613 #define MDI_CLIENT_IS_POWERED_DOWN(ct) \
614 ((ct)->ct_flags & MDI_CLIENT_FLAGS_POWER_DOWN)
616 #define MDI_CLIENT_SET_POWER_TRANSITION(ct) {\
617 ASSERT(MDI_CLIENT_LOCKED(ct)); \
618 (ct)->ct_flags |= MDI_CLIENT_FLAGS_POWER_TRANSITION; }
619 #define MDI_CLIENT_CLEAR_POWER_TRANSITION(ct) {\
620 ASSERT(MDI_CLIENT_LOCKED(ct)); \
621 (ct)->ct_flags &= ~MDI_CLIENT_FLAGS_POWER_TRANSITION; }
622 #define MDI_CLIENT_IS_POWER_TRANSITION(ct) \
623 ((ct)->ct_flags & MDI_CLIENT_FLAGS_POWER_TRANSITION)
625 #define MDI_CLIENT_SET_DETACH(ct) {\
626 ASSERT(MDI_CLIENT_LOCKED(ct)); \
627 (ct)->ct_flags |= MDI_CLIENT_FLAGS_DETACH; }
628 #define MDI_CLIENT_SET_ATTACH(ct) {\
629 ASSERT(MDI_CLIENT_LOCKED(ct)); \
630 (ct)->ct_flags &= ~MDI_CLIENT_FLAGS_DETACH; }
631 #define MDI_CLIENT_IS_DETACHED(ct) \
632 ((ct)->ct_flags & MDI_CLIENT_FLAGS_DETACH)
634 #define MDI_CLIENT_SET_FAILOVER_IN_PROGRESS(ct) {\
635 ASSERT(MDI_CLIENT_LOCKED(ct)); \
636 (ct)->ct_flags |= MDI_CLIENT_FLAGS_FAILOVER; }
637 #define MDI_CLIENT_CLEAR_FAILOVER_IN_PROGRESS(ct) {\
638 ASSERT(MDI_CLIENT_LOCKED(ct)); \
639 (ct)->ct_flags &= ~MDI_CLIENT_FLAGS_FAILOVER; }
640 #define MDI_CLIENT_IS_FAILOVER_IN_PROGRESS(ct) \
641 ((ct)->ct_flags & MDI_CLIENT_FLAGS_FAILOVER)
643 #define MDI_CLIENT_SET_REPORT_DEV_NEEDED(ct) {\
644 ASSERT(MDI_CLIENT_LOCKED(ct)); \
645 (ct)->ct_flags |= MDI_CLIENT_FLAGS_REPORT_DEV; }
646 #define MDI_CLIENT_CLEAR_REPORT_DEV_NEEDED(ct) {\
647 ASSERT(MDI_CLIENT_LOCKED(ct)); \
648 (ct)->ct_flags &= ~MDI_CLIENT_FLAGS_REPORT_DEV; }
649 #define MDI_CLIENT_IS_REPORT_DEV_NEEDED(ct) \
650 ((ct)->ct_flags & MDI_CLIENT_FLAGS_REPORT_DEV)
652 #define MDI_CLIENT_SET_PATH_FREE_IN_PROGRESS(ct) {\
653 ASSERT(MDI_CLIENT_LOCKED(ct)); \
654 (ct)->ct_flags |= MDI_CLIENT_FLAGS_PATH_FREE_IN_PROGRESS; }
655 #define MDI_CLIENT_CLEAR_PATH_FREE_IN_PROGRESS(ct) {\
656 ASSERT(MDI_CLIENT_LOCKED(ct)); \
657 (ct)->ct_flags &= ~MDI_CLIENT_FLAGS_PATH_FREE_IN_PROGRESS; }
658 #define MDI_CLIENT_IS_PATH_FREE_IN_PROGRESS(ct) \
659 ((ct)->ct_flags & MDI_CLIENT_FLAGS_PATH_FREE_IN_PROGRESS)
661 #define MDI_CLIENT_SET_DEV_NOT_SUPPORTED(ct) {\
662 ASSERT(MDI_CLIENT_LOCKED(ct)); \
663 (ct)->ct_flags |= MDI_CLIENT_FLAGS_DEV_NOT_SUPPORTED; }
664 #define MDI_CLIENT_IS_DEV_NOT_SUPPORTED(ct) \
665 ((ct)->ct_flags & MDI_CLIENT_FLAGS_DEV_NOT_SUPPORTED)
674 #define MDI_CLIENT_STATE(ct) ((ct)->ct_state)
675 #define MDI_CLIENT_SET_STATE(ct, state) ((ct)->ct_state = state)
677 #define MDI_CLIENT_IS_FAILED(ct) \
678 ((ct)->ct_state == MDI_CLIENT_STATE_FAILED)