summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-11-30 21:14:25 +0100
committerGravatar waker <wakeroid@gmail.com>2012-11-30 21:14:25 +0100
commit907ed40fd1b1a1298e5d339f51e68df5f0b63872 (patch)
treeb8802e5191a621b11c108ee322db00407b03ab23 /plugins
parentbe472188fde7aa235c426486c42ae4e2278c9093 (diff)
few minor optimizations
Diffstat (limited to 'plugins')
-rw-r--r--plugins/artwork/artwork.c6
-rw-r--r--plugins/gtkui/coverart.c6
-rw-r--r--plugins/gtkui/gtkui.c6
-rw-r--r--plugins/hotkeys/hotkeys.c8
4 files changed, 25 insertions, 1 deletions
diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c
index 3ef62755..74fdcc10 100644
--- a/plugins/artwork/artwork.c
+++ b/plugins/artwork/artwork.c
@@ -5,6 +5,9 @@
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
+#ifdef __linux__
+#include <sys/prctl.h>
+#endif
#include <errno.h>
#include <dirent.h>
#include <unistd.h>
@@ -799,6 +802,9 @@ id3v2_skip_str (int enc, uint8_t *ptr, uint8_t *end) {
static void
fetcher_thread (void *none)
{
+#ifdef __linux__
+ prctl (PR_SET_NAME, "deadbeef-artwork", 0, 0, 0, 0);
+#endif
for (;;) {
trace ("artwork: waiting for signal\n");
deadbeef->cond_wait (cond, mutex);
diff --git a/plugins/gtkui/coverart.c b/plugins/gtkui/coverart.c
index f98957dc..2a803e51 100644
--- a/plugins/gtkui/coverart.c
+++ b/plugins/gtkui/coverart.c
@@ -22,6 +22,9 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
+#ifdef __linux__
+#include <sys/prctl.h>
+#endif
#include "coverart.h"
#include "../artwork/artwork.h"
#include "gtkui.h"
@@ -109,6 +112,9 @@ redraw_playlist_cb (gpointer dt) {
void
loading_thread (void *none) {
+#ifdef __linux__
+ prctl (PR_SET_NAME, "deadbeef-gtkui-artwork", 0, 0, 0, 0);
+#endif
for (;;) {
trace ("covercache: waiting for signal\n");
deadbeef->cond_wait (cond, mutex);
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index 79d1ad63..a584b834 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -27,6 +27,9 @@
#include <sys/time.h>
#include <unistd.h>
#include <sys/stat.h>
+#ifdef __linux__
+#include <sys/prctl.h>
+#endif
#include "../../gettext.h"
#include "gtkui.h"
#include "ddblistview.h"
@@ -871,6 +874,9 @@ unlock_playlist_columns_cb (void *ctx) {
void
gtkui_thread (void *ctx) {
+#ifdef __linux__
+ prctl (PR_SET_NAME, "deadbeef-gtkui", 0, 0, 0, 0);
+#endif
XInitThreads (); // gtkglext/xcb doesn't work without this
// let's start some gtk
g_thread_init (NULL);
diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c
index b2c9f750..a7a1096c 100644
--- a/plugins/hotkeys/hotkeys.c
+++ b/plugins/hotkeys/hotkeys.c
@@ -22,8 +22,11 @@
#include <unistd.h>
#include <X11/Xlib.h>
#include <ctype.h>
-#include "parser.h"
+#ifdef __linux__
+#include <sys/prctl.h>
+#endif
+#include "parser.h"
#include "hotkeys.h"
#include "../../deadbeef.h"
#include "actionhandlers.h"
@@ -388,6 +391,9 @@ x_err_handler (Display *d, XErrorEvent *evt) {
static void
hotkeys_event_loop (void *unused) {
int i;
+#ifdef __linux__
+ prctl (PR_SET_NAME, "deadbeef-hotkeys", 0, 0, 0, 0);
+#endif
while (!finished) {
if (need_reset) {