@@ -60,7 +60,7 @@ static size_t tsrm_reserved_pos = 0;
6060static size_t tsrm_reserved_size = 0 ;
6161
6262static MUTEX_T tsmm_mutex ; /* thread-safe memory manager mutex */
63- static RWLOCK_T tsrm_env_mutex ; /* tsrm environ mutex */
63+ static RWLOCK_T tsrm_env_rwlock ; /* tsrm environ rwlock */
6464
6565/* New thread handlers */
6666static tsrm_thread_begin_func_t tsrm_new_thread_begin_handler = NULL ;
@@ -156,7 +156,7 @@ TSRM_API bool tsrm_startup(int expected_threads, int expected_resources, int deb
156156 tsrm_reserved_pos = 0 ;
157157 tsrm_reserved_size = 0 ;
158158
159- tsrm_env_mutex = tsrm_rwlock_alloc ();
159+ tsrm_env_rwlock = tsrm_rwlock_alloc ();
160160
161161 return 1 ;
162162}/*}}}*/
@@ -212,7 +212,7 @@ TSRM_API void tsrm_shutdown(void)
212212 free (tsrm_tls_table );
213213 free (resource_types_table );
214214 tsrm_mutex_free (tsmm_mutex );
215- tsrm_rwlock_free (tsrm_env_mutex );
215+ tsrm_rwlock_free (tsrm_env_rwlock );
216216 TSRM_ERROR ((TSRM_ERROR_LEVEL_CORE , "Shutdown TSRM" ));
217217 if (tsrm_error_file != stderr ) {
218218 fclose (tsrm_error_file );
@@ -238,17 +238,17 @@ TSRM_API void tsrm_shutdown(void)
238238/* environ lock api */
239239TSRM_API void tsrm_env_lock (bool write ) {
240240 if (write ) {
241- tsrm_rwlock_wrlock (tsrm_env_mutex );
241+ tsrm_rwlock_wrlock (tsrm_env_rwlock );
242242 } else {
243- tsrm_rwlock_rlock (tsrm_env_mutex );
243+ tsrm_rwlock_rlock (tsrm_env_rwlock );
244244 }
245245}
246246
247247TSRM_API void tsrm_env_unlock (bool write ) {
248248 if (write ) {
249- tsrm_rwlock_wrunlock (tsrm_env_mutex );
249+ tsrm_rwlock_wrunlock (tsrm_env_rwlock );
250250 } else {
251- tsrm_rwlock_runlock (tsrm_env_mutex );
251+ tsrm_rwlock_runlock (tsrm_env_rwlock );
252252 }
253253} /* }}} */
254254
0 commit comments