bar: set thread name of the bar’s own thread

This commit is contained in:
Daniel Eklöf 2021-06-21 18:16:22 +02:00
parent 371bfb4065
commit 08fa56a0f4
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 6 additions and 0 deletions

View file

@ -6,6 +6,7 @@
#include <assert.h>
#include <unistd.h>
#include <poll.h>
#include <pthread.h>
#include <sys/mman.h>
#include <linux/memfd.h>
@ -1015,6 +1016,8 @@ loop(struct bar *_bar,
struct private *bar = _bar->private;
struct wayland_backend *backend = bar->backend.data;
pthread_setname_np(pthread_self(), "bar(wayland)");
backend->bar_expose = expose;
backend->bar_on_mouse = on_mouse;

View file

@ -5,6 +5,7 @@
#include <unistd.h>
#include <poll.h>
#include <pthread.h>
#include <pixman.h>
#include <xcb/xcb.h>
@ -316,6 +317,8 @@ loop(struct bar *_bar,
struct private *bar = _bar->private;
struct xcb_backend *backend = bar->backend.data;
pthread_setname_np(pthread_self(), "bar(xcb)");
const int fd = xcb_get_file_descriptor(backend->conn);
while (true) {