summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_inline_lock_posix.x
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eina/eina_inline_lock_posix.x')
-rw-r--r--src/lib/eina/eina_inline_lock_posix.x6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/eina/eina_inline_lock_posix.x b/src/lib/eina/eina_inline_lock_posix.x
index 625441accf..911b5c1f3b 100644
--- a/src/lib/eina/eina_inline_lock_posix.x
+++ b/src/lib/eina/eina_inline_lock_posix.x
@@ -225,7 +225,10 @@ eina_lock_take_try(Eina_Lock *mutex)
225 if (mutex->recursive) return ret; 225 if (mutex->recursive) return ret;
226 mutex->locked = 1; 226 mutex->locked = 1;
227 mutex->lock_thread_id = pthread_self(); 227 mutex->lock_thread_id = pthread_self();
228 /* backtrace() can somehow generate EINVAL even though this is not documented anywhere? */
229 int err = errno;
228 mutex->lock_bt_num = backtrace((void **)(mutex->lock_bt), EINA_LOCK_DEBUG_BT_NUM); 230 mutex->lock_bt_num = backtrace((void **)(mutex->lock_bt), EINA_LOCK_DEBUG_BT_NUM);
231 errno = err;
229 232
230 pthread_mutex_lock(&_eina_tracking_lock); 233 pthread_mutex_lock(&_eina_tracking_lock);
231 _eina_tracking = eina_inlist_append(_eina_tracking, 234 _eina_tracking = eina_inlist_append(_eina_tracking,
@@ -295,7 +298,10 @@ eina_lock_take(Eina_Lock *mutex)
295 if (mutex->recursive) return ret; 298 if (mutex->recursive) return ret;
296 mutex->locked = 1; 299 mutex->locked = 1;
297 mutex->lock_thread_id = pthread_self(); 300 mutex->lock_thread_id = pthread_self();
301 /* backtrace() can somehow generate EINVAL even though this is not documented anywhere? */
302 int err = errno;
298 mutex->lock_bt_num = backtrace((void **)(mutex->lock_bt), EINA_LOCK_DEBUG_BT_NUM); 303 mutex->lock_bt_num = backtrace((void **)(mutex->lock_bt), EINA_LOCK_DEBUG_BT_NUM);
304 errno = err;
299 305
300 pthread_mutex_lock(&_eina_tracking_lock); 306 pthread_mutex_lock(&_eina_tracking_lock);
301 _eina_tracking = eina_inlist_append(_eina_tracking, 307 _eina_tracking = eina_inlist_append(_eina_tracking,