Lines Matching refs:j
209 int j; in tsrm_shutdown() local
212 for (j=0; j<p->count; j++) { in tsrm_shutdown()
213 if (p->storage[j]) { in tsrm_shutdown()
214 if (resource_types_table && !resource_types_table[j].done && resource_types_table[j].dtor) { in tsrm_shutdown()
215 resource_types_table[j].dtor(p->storage[j]); in tsrm_shutdown()
217 if (!resource_types_table[j].fast_offset) { in tsrm_shutdown()
218 free(p->storage[j]); in tsrm_shutdown()
274 int j; in tsrm_update_active_threads() local
277 for (j=p->count; j<id_count; j++) { in tsrm_update_active_threads()
278 if (resource_types_table[j].fast_offset) { in tsrm_update_active_threads()
279 p->storage[j] = (void *) (((char*)p) + resource_types_table[j].fast_offset); in tsrm_update_active_threads()
281 p->storage[j] = (void *) malloc(resource_types_table[j].size); in tsrm_update_active_threads()
283 if (resource_types_table[j].ctor) { in tsrm_update_active_threads()
284 resource_types_table[j].ctor(p->storage[j]); in tsrm_update_active_threads()
608 int j = TSRM_UNSHUFFLE_RSRC_ID(id); in ts_free_id() local
619 if (p->count > j && p->storage[j]) { in ts_free_id()
620 if (resource_types_table && resource_types_table[j].dtor) { in ts_free_id()
621 resource_types_table[j].dtor(p->storage[j]); in ts_free_id()
623 if (!resource_types_table[j].fast_offset) { in ts_free_id()
624 free(p->storage[j]); in ts_free_id()
626 p->storage[j] = NULL; in ts_free_id()
632 resource_types_table[j].done = 1; in ts_free_id()