]> git.sesse.net Git - cubemap/blobdiff - udpinput.h
Use C++11 std::mutex and std::lock_guard instead of our RAII wrapper.
[cubemap] / udpinput.h
index b3f504aa20255943302a77e5673489fd89ba4831..4de9788768e71ed1a98bccd844eade0d5b5f05ab 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _UDPINPUT_H
 #define _UDPINPUT_H 1
 
 #ifndef _UDPINPUT_H
 #define _UDPINPUT_H 1
 
-#include <pthread.h>
+#include <mutex>
 #include <string>
 #include <vector>
 
 #include <string>
 #include <vector>
 
@@ -47,7 +47,7 @@ private:
        char packet_buf[65536];
 
        // Mutex protecting <stats>.
        char packet_buf[65536];
 
        // Mutex protecting <stats>.
-       mutable pthread_mutex_t stats_mutex;
+       mutable std::mutex stats_mutex;
 
        // The current statistics for this connection. Protected by <stats_mutex>.
        InputStats stats;
 
        // The current statistics for this connection. Protected by <stats_mutex>.
        InputStats stats;