]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/mutex.cpp
Use the system call name as parameter to system_error
[libs/core.git] / source / core / mutex.cpp
index e1657c9f88c5d32c712b1d362c4cfbb9c8529b8d..4f830c5965fd3da0bbf684e24ab5c40e6fdfc9a7 100644 (file)
@@ -33,7 +33,7 @@ void Mutex::lock()
        EnterCriticalSection(&priv->crit);
 #else
        if(int err = pthread_mutex_lock(&priv->mutex))
-               throw system_error("Mutex::lock", err);
+               throw system_error("pthread_mutex_lock", err);
 #endif
 }
 
@@ -44,7 +44,7 @@ bool Mutex::trylock()
 #else
        int err = pthread_mutex_trylock(&priv->mutex);
        if(err && err!=EBUSY)
-               throw system_error("Mutex::trylock", err);
+               throw system_error("pthread_mutex_trylock", err);
        return !err;
 #endif
 }
@@ -55,7 +55,7 @@ void Mutex::unlock()
        LeaveCriticalSection(&priv->crit);
 #else
        if(int err = pthread_mutex_unlock(&priv->mutex))
-               throw system_error("Mutex::unlock", err);
+               throw system_error("pthread_mutex_unlock", err);
 #endif
 }