]> git.sesse.net Git - nageru/blobdiff - midi_mapper.cpp
Give all of our threads meaningful names, to aid with debugging.
[nageru] / midi_mapper.cpp
index 6ce50302eec560f77472cc4c372e68fd8cdd547c..d03f38211e524a2fcb85b70c96cddc4c958b46d9 100644 (file)
@@ -8,6 +8,7 @@
 #include <google/protobuf/io/zero_copy_stream_impl.h>
 #include <google/protobuf/message.h>
 #include <google/protobuf/text_format.h>
+#include <pthread.h>
 #include <poll.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -148,6 +149,8 @@ ControllerReceiver *MIDIMapper::set_receiver(ControllerReceiver *new_receiver)
 
 void MIDIMapper::thread_func()
 {
+       pthread_setname_np(pthread_self(), "MIDIMapper");
+
        snd_seq_t *seq;
        int err;