From f05d65e5cf4b376a6bf1eeed17356f8e7767b389 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 26 Nov 2024 14:31:14 -0500 Subject: thread: New thread_setname() function --- src/thread.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/thread.h') diff --git a/src/thread.h b/src/thread.h index 7d12468..3dd8422 100644 --- a/src/thread.h +++ b/src/thread.h @@ -21,6 +21,11 @@ typedef void *thread_fn(void *arg); */ int thread_create(pthread_t *thread, const pthread_attr_t *attr, thread_fn *fn, void *arg); +/** + * Set the name of a thread. + */ +void thread_setname(pthread_t thread, const char *name); + /** * Wrapper for pthread_join(). */ -- cgit v1.2.3