Lines Matching refs:thread_resources

87 						unshuffled_offset, (long) thread_resources->thread_id, array[unshuffled_offset]));				\
91 … unshuffled_offset, TSRM_SHUFFLE_RSRC_ID(0), TSRM_SHUFFLE_RSRC_ID(thread_resources->count-1))); \
440 tsrm_tls_entry *thread_resources; in ts_resource_ex() local
448 thread_resources = tsrm_tls_get(); in ts_resource_ex()
450 if (thread_resources) { in ts_resource_ex()
451 …EL_INFO, "Fetching resource id %d for current thread %d", id, (long) thread_resources->thread_id)); in ts_resource_ex()
456 TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count); in ts_resource_ex()
467 thread_resources = tsrm_tls_table[hash_value]; in ts_resource_ex()
469 if (!thread_resources) { in ts_resource_ex()
474 if (thread_resources->thread_id == thread_id) { in ts_resource_ex()
477 if (thread_resources->next) { in ts_resource_ex()
478 thread_resources = thread_resources->next; in ts_resource_ex()
480 allocate_new_resource(&thread_resources->next, thread_id); in ts_resource_ex()
487 } while (thread_resources); in ts_resource_ex()
494 TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count); in ts_resource_ex()
501 tsrm_tls_entry *next, *thread_resources = (tsrm_tls_entry*)context; in tsrm_free_interpreter_context() local
504 while (thread_resources) { in tsrm_free_interpreter_context()
505 next = thread_resources->next; in tsrm_free_interpreter_context()
507 for (i=0; i<thread_resources->count; i++) { in tsrm_free_interpreter_context()
509 resource_types_table[i].dtor(thread_resources->storage[i]); in tsrm_free_interpreter_context()
512 for (i=0; i<thread_resources->count; i++) { in tsrm_free_interpreter_context()
514 free(thread_resources->storage[i]); in tsrm_free_interpreter_context()
517 free(thread_resources->storage); in tsrm_free_interpreter_context()
518 free(thread_resources); in tsrm_free_interpreter_context()
519 thread_resources = next; in tsrm_free_interpreter_context()
562 tsrm_tls_entry *thread_resources; in ts_free_thread() local
572 thread_resources = tsrm_tls_table[hash_value]; in ts_free_thread()
574 while (thread_resources) { in ts_free_thread()
575 if (thread_resources->thread_id == thread_id) { in ts_free_thread()
576 for (i=0; i<thread_resources->count; i++) { in ts_free_thread()
578 resource_types_table[i].dtor(thread_resources->storage[i]); in ts_free_thread()
581 for (i=0; i<thread_resources->count; i++) { in ts_free_thread()
583 free(thread_resources->storage[i]); in ts_free_thread()
586 free(thread_resources->storage); in ts_free_thread()
588 last->next = thread_resources->next; in ts_free_thread()
590 tsrm_tls_table[hash_value] = thread_resources->next; in ts_free_thread()
593 free(thread_resources); in ts_free_thread()
596 if (thread_resources->next) { in ts_free_thread()
597 last = thread_resources; in ts_free_thread()
599 thread_resources = thread_resources->next; in ts_free_thread()