Lines Matching refs:smb_uch
147 static smb_uchandle_t smb_uch;
392 ucnode = avl_first(&smb_uch.uc_cache);
394 ucnode = AVL_NEXT(&smb_uch.uc_cache, iter->spi_next);
860 (void) mutex_lock(&smb_uch.uc_mtx);
861 switch (smb_uch.uc_state) {
865 (void) mutex_unlock(&smb_uch.uc_mtx);
874 (void) mutex_unlock(&smb_uch.uc_mtx);
878 (void) mutex_unlock(&smb_uch.uc_mtx);
887 (void) mutex_unlock(&smb_uch.uc_mtx);
897 (void) mutex_unlock(&smb_uch.uc_mtx);
904 if ((smb_uch.uc_timestamp.tv_sec == stbuf.st_mtim.tv_sec) &&
905 (smb_uch.uc_timestamp.tv_nsec == stbuf.st_mtim.tv_nsec)) {
906 (void) mutex_unlock(&smb_uch.uc_mtx);
911 smb_uch.uc_state = SMB_UCHS_UPDATING;
912 smb_uch.uc_refcnt++;
913 (void) mutex_unlock(&smb_uch.uc_mtx);
917 (void) mutex_lock(&smb_uch.uc_mtx);
919 smb_uch.uc_timestamp = stbuf.st_mtim;
920 smb_uch.uc_state = SMB_UCHS_UPDATED;
921 smb_uch.uc_refcnt--;
922 (void) cond_broadcast(&smb_uch.uc_cv);
923 (void) mutex_unlock(&smb_uch.uc_mtx);
967 (void) rw_rdlock(&smb_uch.uc_cache_lck);
971 uc_newnode = avl_find(&smb_uch.uc_cache, &uc_node, NULL);
1008 (void) rw_unlock(&smb_uch.uc_cache_lck);
1013 (void) rw_wrlock(&smb_uch.uc_cache_lck);
1015 avl_add(&smb_uch.uc_cache, uc_newnode);
1017 (void) rw_unlock(&smb_uch.uc_cache_lck);
1034 (void) mutex_lock(&smb_uch.uc_mtx);
1035 if (smb_uch.uc_state != SMB_UCHS_NOCACHE) {
1036 (void) mutex_unlock(&smb_uch.uc_mtx);
1040 avl_create(&smb_uch.uc_cache, smb_lucache_cmp,
1043 smb_uch.uc_state = SMB_UCHS_CREATED;
1044 bzero(&smb_uch.uc_timestamp, sizeof (timestruc_t));
1045 smb_uch.uc_refcnt = 0;
1046 (void) mutex_unlock(&smb_uch.uc_mtx);
1060 (void) rw_wrlock(&smb_uch.uc_cache_lck);
1061 while ((ucnode = avl_destroy_nodes(&smb_uch.uc_cache, &cookie))
1068 (void) rw_unlock(&smb_uch.uc_cache_lck);
1081 (void) mutex_lock(&smb_uch.uc_mtx);
1082 switch (smb_uch.uc_state) {
1085 (void) mutex_unlock(&smb_uch.uc_mtx);
1092 smb_uch.uc_state = SMB_UCHS_DESTROYING;
1094 while (smb_uch.uc_refcnt > 0)
1095 (void) cond_wait(&smb_uch.uc_cv, &smb_uch.uc_mtx);
1099 avl_destroy(&smb_uch.uc_cache);
1100 smb_uch.uc_state = SMB_UCHS_NOCACHE;
1101 (void) mutex_unlock(&smb_uch.uc_mtx);
1113 (void) mutex_lock(&smb_uch.uc_mtx);
1114 switch (smb_uch.uc_state) {
1117 (void) mutex_unlock(&smb_uch.uc_mtx);
1121 (void) mutex_unlock(&smb_uch.uc_mtx);
1124 smb_uch.uc_refcnt++;
1125 (void) mutex_unlock(&smb_uch.uc_mtx);
1127 (void) rw_rdlock(&smb_uch.uc_cache_lck);
1139 (void) rw_unlock(&smb_uch.uc_cache_lck);
1141 (void) mutex_lock(&smb_uch.uc_mtx);
1142 smb_uch.uc_refcnt--;
1143 (void) cond_broadcast(&smb_uch.uc_cv);
1144 (void) mutex_unlock(&smb_uch.uc_mtx);
1157 (void) mutex_lock(&smb_uch.uc_mtx);
1158 switch (smb_uch.uc_state) {
1161 (void) mutex_unlock(&smb_uch.uc_mtx);
1165 (void) mutex_unlock(&smb_uch.uc_mtx);
1168 (void) mutex_unlock(&smb_uch.uc_mtx);
1170 (void) rw_rdlock(&smb_uch.uc_cache_lck);
1171 num = (int)avl_numnodes(&smb_uch.uc_cache);
1172 (void) rw_unlock(&smb_uch.uc_cache_lck);