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))); \
420 tsrm_tls_entry *thread_resources; in ts_resource_ex() local
428 thread_resources = tsrm_tls_get(); in ts_resource_ex()
430 if (thread_resources) { in ts_resource_ex()
431 …EL_INFO, "Fetching resource id %d for current thread %d", id, (long) thread_resources->thread_id)); in ts_resource_ex()
436 TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count); in ts_resource_ex()
447 thread_resources = tsrm_tls_table[hash_value]; in ts_resource_ex()
449 if (!thread_resources) { in ts_resource_ex()
454 if (thread_resources->thread_id == thread_id) { in ts_resource_ex()
457 if (thread_resources->next) { in ts_resource_ex()
458 thread_resources = thread_resources->next; in ts_resource_ex()
460 allocate_new_resource(&thread_resources->next, thread_id); in ts_resource_ex()
467 } while (thread_resources); in ts_resource_ex()
474 TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count); in ts_resource_ex()
481 tsrm_tls_entry *thread_resources; in ts_free_thread() local
491 thread_resources = tsrm_tls_table[hash_value]; in ts_free_thread()
493 while (thread_resources) { in ts_free_thread()
494 if (thread_resources->thread_id == thread_id) { in ts_free_thread()
495 for (i=0; i<thread_resources->count; i++) { in ts_free_thread()
497 resource_types_table[i].dtor(thread_resources->storage[i]); in ts_free_thread()
500 for (i=0; i<thread_resources->count; i++) { in ts_free_thread()
502 free(thread_resources->storage[i]); in ts_free_thread()
505 free(thread_resources->storage); in ts_free_thread()
507 last->next = thread_resources->next; in ts_free_thread()
509 tsrm_tls_table[hash_value] = thread_resources->next; in ts_free_thread()
512 free(thread_resources); in ts_free_thread()
515 if (thread_resources->next) { in ts_free_thread()
516 last = thread_resources; in ts_free_thread()
518 thread_resources = thread_resources->next; in ts_free_thread()