diff options
Diffstat (limited to 'gdbsupport/thread-pool.c')
-rw-r--r-- | gdbsupport/thread-pool.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gdbsupport/thread-pool.c b/gdbsupport/thread-pool.c index fc83ff7..be9ca22 100644 --- a/gdbsupport/thread-pool.c +++ b/gdbsupport/thread-pool.c @@ -40,8 +40,16 @@ #include <pthread.h> /* Handle platform discrepancies in pthread_setname_np: macOS uses a - single-argument form, while Linux uses a two-argument form. This - wrapper handles the difference. */ + single-argument form, while Linux uses a two-argument form. NetBSD + takes a printf-style format and an argument. This wrapper handles the + difference. */ + +ATTRIBUTE_UNUSED static void +set_thread_name (int (*set_name) (pthread_t, const char *, void *), + const char *name) +{ + set_name (pthread_self (), "%s", const_cast<char *> (name)); +} ATTRIBUTE_UNUSED static void set_thread_name (int (*set_name) (pthread_t, const char *), const char *name) |