Fix: pthread::mutex unlock must not throw
[lttng-tools.git] / src / common / pthread-lock.hpp
index 35fde097cadbf92ea6f6744bc236272c2120c5e7..d19e3f3fbeb9ba066c19494ce209191859d2b495 100644 (file)
@@ -57,7 +57,10 @@ public:
        void unlock()
        {
                if (pthread_mutex_unlock(&_mutex) != 0) {
-                       LTTNG_THROW_POSIX("Failed to unlock mutex", errno);
+                       /*
+                        * Unlock cannot throw as it is called as part of lock_guard's destructor.
+                        */
+                       abort();
                }
        }
 
This page took 0.025408 seconds and 4 git commands to generate.