]> git.sesse.net Git - cubemap/blobdiff - accesslog.h
Use C++11 std::mutex and std::lock_guard instead of our RAII wrapper.
[cubemap] / accesslog.h
index 0ef5c753ef4c433c9ba1411d5195ce15f87085aa..b6ce61c36a7d87c6e21b67de05725d19296cd86c 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <pthread.h>
 #include <stdio.h>
+#include <mutex>
 #include <string>
 #include <vector>
 
@@ -29,11 +30,11 @@ public:
 private:
        virtual void do_work();
 
-       // The file we are logging to. If NULL, do not log.
+       // The file we are logging to. If nullptr, do not log.
        FILE *logfp;
        std::string filename;
 
-       pthread_mutex_t mutex;
+       std::mutex mu;
        std::vector<ClientStats> pending_writes;
 };