Lines Matching refs:ss
217 sad_ap_rele(struct autopush *ap, str_stack_t *ss)
219 mutex_enter(&ss->ss_sad_lock);
222 mutex_exit(&ss->ss_sad_lock);
225 mutex_exit(&ss->ss_sad_lock);
230 sad_ap_insert(struct autopush *ap, str_stack_t *ss)
232 ASSERT(MUTEX_HELD(&ss->ss_sad_lock));
234 ASSERT(sad_ap_find(&ap->ap_common, ss) == NULL);
235 (void) mod_hash_insert(ss->ss_sad_hash, &ap->ap_common, ap);
239 sad_ap_remove(struct autopush *ap, str_stack_t *ss)
243 ASSERT(MUTEX_HELD(&ss->ss_sad_lock));
244 (void) mod_hash_remove(ss->ss_sad_hash, &ap->ap_common,
250 sad_ap_find(struct apcommon *apc, str_stack_t *ss)
254 ASSERT(MUTEX_HELD(&ss->ss_sad_lock));
257 (void) mod_hash_find(ss->ss_sad_hash, apc,
265 sad_ap_find_by_dev(dev_t dev, str_stack_t *ss)
270 ASSERT(MUTEX_NOT_HELD(&ss->ss_sad_lock));
285 mutex_enter(&ss->ss_sad_lock);
286 ap_result = sad_ap_find(&apc, ss);
287 mutex_exit(&ss->ss_sad_lock);
292 sad_initspace(str_stack_t *ss)
294 mutex_init(&ss->ss_sad_lock, NULL, MUTEX_DEFAULT, NULL);
295 ss->ss_sad_hash_nchains = 127;
296 ss->ss_sadcnt = 16;
298 ss->ss_saddev = kmem_zalloc(ss->ss_sadcnt * sizeof (struct saddev),
300 ss->ss_sad_hash = mod_hash_create_extended("sad_hash",
301 ss->ss_sad_hash_nchains, mod_hash_null_keydtor,
307 sad_freespace(str_stack_t *ss)
309 kmem_free(ss->ss_saddev, ss->ss_sadcnt * sizeof (struct saddev));
310 ss->ss_saddev = NULL;
312 mutex_enter(&ss->ss_sad_lock);
313 mod_hash_walk(ss->ss_sad_hash, sad_hash_free_value, NULL);
314 mod_hash_destroy_hash(ss->ss_sad_hash);
315 ss->ss_sad_hash = NULL;
316 mutex_exit(&ss->ss_sad_lock);
318 mutex_destroy(&ss->ss_sad_lock);