Lines Matching refs:j
186 int j; in tsrm_shutdown() local
189 for (j=0; j<p->count; j++) { in tsrm_shutdown()
190 if (p->storage[j]) { in tsrm_shutdown()
192 if (!resource_types_table[j].done) { in tsrm_shutdown()
193 if (resource_types_table[j].dtor) { in tsrm_shutdown()
194 resource_types_table[j].dtor(p->storage[j]); in tsrm_shutdown()
197 if (!resource_types_table[j].fast_offset) { in tsrm_shutdown()
198 free(p->storage[j]); in tsrm_shutdown()
254 int j; in tsrm_update_active_threads() local
257 for (j=p->count; j<id_count; j++) { in tsrm_update_active_threads()
258 if (resource_types_table[j].fast_offset) { in tsrm_update_active_threads()
259 p->storage[j] = (void *) (((char*)p) + resource_types_table[j].fast_offset); in tsrm_update_active_threads()
261 p->storage[j] = (void *) malloc(resource_types_table[j].size); in tsrm_update_active_threads()
263 if (resource_types_table[j].ctor) { in tsrm_update_active_threads()
264 resource_types_table[j].ctor(p->storage[j]); in tsrm_update_active_threads()
527 int j = TSRM_UNSHUFFLE_RSRC_ID(id); in ts_free_id() local
538 if (p->count > j && p->storage[j]) { in ts_free_id()
540 if (resource_types_table[j].dtor) { in ts_free_id()
541 resource_types_table[j].dtor(p->storage[j]); in ts_free_id()
543 if (!resource_types_table[j].fast_offset) { in ts_free_id()
544 free(p->storage[j]); in ts_free_id()
547 p->storage[j] = NULL; in ts_free_id()
553 resource_types_table[j].done = 1; in ts_free_id()