Lines Matching defs:rsm_resource
147 * called rsm_resource. This pool is protected via a reader-writer lock,
446 static struct rsmresource_table rsm_resource;
611 rw_init(&rsm_resource.rsmrc_lock, NULL, RW_DRIVER, NULL);
696 rw_destroy(&rsm_resource.rsmrc_lock);
1127 rw_enter(&rsm_resource.rsmrc_lock, RW_WRITER);
1130 for (i = 0; i < rsm_resource.rsmrc_len; i++) {
1131 blk = rsm_resource.rsmrc_root[i];
1143 rw_exit(&rsm_resource.
1162 rw_exit(&rsm_resource.rsmrc_lock);
1180 if (rsm_resource.rsmrc_len == rsm_resource.rsmrc_sz) {
1185 uint_t newsz = (uint_t)rsm_resource.rsmrc_sz +
1190 if (rsm_resource.rsmrc_len*RSMRC_BLKSZ >=
1192 rw_exit(&rsm_resource.rsmrc_lock);
1200 if (rsm_resource.rsmrc_root) {
1203 oldsz = (uint_t)(rsm_resource.rsmrc_sz *
1210 bcopy(rsm_resource.rsmrc_root, p, oldsz);
1211 kmem_free(rsm_resource.rsmrc_root, oldsz);
1214 rsm_resource.rsmrc_root = p;
1215 rsm_resource.rsmrc_sz = (int)newsz;
1218 empty = rsm_resource.rsmrc_len;
1219 rsm_resource.rsmrc_len++;
1226 ASSERT(rsm_resource.rsmrc_root[empty] == NULL);
1227 rsm_resource.rsmrc_root[empty] = blk;
1240 rw_exit(&rsm_resource.rsmrc_lock);
1249 rw_exit(&rsm_resource.rsmrc_lock);
1272 if (i >= rsm_resource.rsmrc_len) {
1278 rw_enter(&rsm_resource.rsmrc_lock, RW_WRITER);
1280 ASSERT(rsm_resource.rsmrc_root);
1281 ASSERT(i < rsm_resource.rsmrc_len);
1282 ASSERT(i < rsm_resource.rsmrc_sz);
1283 blk = rsm_resource.rsmrc_root[i];
1285 rw_exit(&rsm_resource.rsmrc_lock);
1303 rsm_resource.rsmrc_root[i] = NULL;
1306 rw_exit(&rsm_resource.rsmrc_lock);
1330 if (i >= rsm_resource.rsmrc_len) {
1336 rw_enter(&rsm_resource.rsmrc_lock, RW_READER);
1338 blk = rsm_resource.rsmrc_root[i];
1340 ASSERT(i < rsm_resource.rsmrc_len);
1341 ASSERT(i < rsm_resource.rsmrc_sz);
1354 rw_exit(&rsm_resource.rsmrc_lock);
1380 rw_enter(&rsm_resource.rsmrc_lock, RW_READER);
1382 ASSERT(rsm_resource.rsmrc_root);
1383 ASSERT(i < rsm_resource.rsmrc_len);
1384 ASSERT(i < rsm_resource.rsmrc_sz);
1386 blk = rsm_resource.rsmrc_root[i];
1396 rw_exit(&rsm_resource.rsmrc_lock);
1407 rw_enter(&rsm_resource.rsmrc_lock, RW_WRITER);
1409 for (i = 0; i < rsm_resource.rsmrc_len; i++) {
1412 blk = rsm_resource.rsmrc_root[i];
1424 rsm_resource.rsmrc_root[i] = NULL;
1426 if (rsm_resource.rsmrc_root) {
1427 i = rsm_resource.rsmrc_sz * (int)sizeof (rsmresource_blk_t *);
1428 kmem_free(rsm_resource.rsmrc_root, (uint_t)i);
1429 rsm_resource.rsmrc_root = NULL;
1430 rsm_resource.rsmrc_len = 0;
1431 rsm_resource.rsmrc_sz = 0;
1437 rw_exit(&rsm_resource.rsmrc_lock);
3562 rw_enter(&rsm_resource.rsmrc_lock, RW_READER);
3564 for (i = 0; i < rsm_resource.rsmrc_len; i++) {
3565 blk = rsm_resource.rsmrc_root[i];
3593 rw_exit(&rsm_resource.rsmrc_lock);
9424 rw_enter(&rsm_resource.rsmrc_lock, RW_READER);
9426 for (i = 0; i < rsm_resource.rsmrc_len; i++) {
9427 blk = rsm_resource.rsmrc_root[i];
9444 rw_exit(&rsm_resource.rsmrc_lock);