be sure to unlock that mutex before returning!

This commit is contained in:
Shane Caraveo 2001-01-08 00:32:18 +00:00
parent 0a1d3aa108
commit 65eac44f69

View File

@ -249,6 +249,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
if (!thread_resources) { if (!thread_resources) {
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id); allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
tsrm_mutex_unlock(tsmm_mutex);
return ts_resource(id); return ts_resource(id);
/* thread_resources = tsrm_tls_table[hash_value]; */ /* thread_resources = tsrm_tls_table[hash_value]; */
} else { } else {
@ -260,6 +261,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
thread_resources = thread_resources->next; thread_resources = thread_resources->next;
} else { } else {
allocate_new_resource(&thread_resources->next, thread_id); allocate_new_resource(&thread_resources->next, thread_id);
tsrm_mutex_unlock(tsmm_mutex);
return ts_resource(id); return ts_resource(id);
/* /*
* thread_resources = thread_resources->next; * thread_resources = thread_resources->next;