summaryrefslogtreecommitdiffstats
path: root/src/Utils.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-06-17 14:24:56 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-06-17 14:24:56 +0200
commit5950cd21ae4ad1b9ddc98a6f1c8716e1627ebbd2 (patch)
tree617d2af1c25f71fb3511639430a20848c9d8dace /src/Utils.cpp
parente48df9cb5ec9e48cd836ec227127f42c5cc99aa1 (diff)
downloaddabmod-5950cd21ae4ad1b9ddc98a6f1c8716e1627ebbd2.tar.gz
dabmod-5950cd21ae4ad1b9ddc98a6f1c8716e1627ebbd2.tar.bz2
dabmod-5950cd21ae4ad1b9ddc98a6f1c8716e1627ebbd2.zip
Set custom names to threads
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index ab1866c..aafd6af 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -27,6 +27,8 @@
#include "Utils.h"
#include "GainControl.h"
+#include <sys/prctl.h>
+#include <pthread.h>
void printUsage(char* progName)
{
@@ -124,3 +126,8 @@ int set_realtime_prio(int prio)
return ret;
}
+void set_thread_name(const char *name)
+{
+ prctl(PR_SET_NAME,name,0,0,0);
+}
+