]> git.cworth.org Git - apitrace/blobdiff - common/trace_writer_local.hpp
Add missing sign cast.
[apitrace] / common / trace_writer_local.hpp
index 7c705801b716de4fb7d56d73a5c1cef63df3476d..c00818b070c303d9eb1557232c9ac5f840fa7124 100644 (file)
@@ -31,6 +31,9 @@
 #define _TRACE_WRITER_LOCAL_HPP_
 
 
+#include <stdint.h>
+
+#include "os_thread.hpp"
 #include "trace_writer.hpp"
 
 
@@ -52,6 +55,10 @@ namespace trace {
      */
     class LocalWriter : public Writer {
     protected:
+        /**
+         * We need a recursive mutex so that it doesn't dead lock when a segfault happens when the mutex is held.
+         */
+        os::recursive_mutex mutex;
         int acquired;
 
     public: