comparison gtk3/dw.c @ 2750:c77974083ba1

GTK2/3: A few more pthread_setspecific() changes... gcc 11.2 reported the first set, 11.2.1 reported these... I think this is them all now.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 28 Dec 2021 11:48:34 +0000
parents 1f2c4f7aca4b
children ee1cfa7d645e
comparison
equal deleted inserted replaced
2749:1f2c4f7aca4b 2750:c77974083ba1
2177 if(orig == (pthread_t)-1) 2177 if(orig == (pthread_t)-1)
2178 { 2178 {
2179 if(!pthread_getspecific(_dw_mutex_key)) 2179 if(!pthread_getspecific(_dw_mutex_key))
2180 { 2180 {
2181 _dw_gdk_threads_enter(); 2181 _dw_gdk_threads_enter();
2182 pthread_setspecific(_dw_mutex_key, (void *)1); 2182 pthread_setspecific(_dw_mutex_key, (void *)&_dw_locked_by_me);
2183 _dw_locked_by_me = TRUE; 2183 _dw_locked_by_me = TRUE;
2184 } 2184 }
2185 _dw_thread = curr; 2185 _dw_thread = curr;
2186 } 2186 }
2187 if(curr == _dw_thread && gtk_events_pending()) 2187 if(curr == _dw_thread && gtk_events_pending())
2216 if(_dw_thread == (pthread_t)-1) 2216 if(_dw_thread == (pthread_t)-1)
2217 { 2217 {
2218 if(!pthread_getspecific(_dw_mutex_key)) 2218 if(!pthread_getspecific(_dw_mutex_key))
2219 { 2219 {
2220 _dw_gdk_threads_enter(); 2220 _dw_gdk_threads_enter();
2221 pthread_setspecific(_dw_mutex_key, (void *)1); 2221 pthread_setspecific(_dw_mutex_key, (void *)&_dw_locked_by_me);
2222 _dw_locked_by_me = TRUE; 2222 _dw_locked_by_me = TRUE;
2223 } 2223 }
2224 _dw_thread = curr; 2224 _dw_thread = curr;
2225 } 2225 }
2226 if(curr == _dw_thread && gtk_events_pending()) 2226 if(curr == _dw_thread && gtk_events_pending())