LibC: Implement pthread_{get,set}name_np

This commit is contained in:
2026-07-02 19:50:58 +03:00
parent c0e091b647
commit 50fd526e6f
3 changed files with 34 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ struct uthread
// LIBC
pid_t id;
pthread_attr_t attr;
char name[16];
int errno_;
int libc_owns_stack;
int cancel_type;

View File

@@ -170,6 +170,8 @@ void pthread_cleanup_push(void (*routine)(void*), void* arg);
int pthread_getattr_np(pthread_t thread, pthread_attr_t* attr);
int pthread_getattr_default_np(pthread_attr_t* attr);
int pthread_setattr_default_np(const pthread_attr_t* attr);
int pthread_getname_np(pthread_t thread, char* name, size_t size);
int pthread_setname_np(pthread_t thread, const char* name);
#define _pthread_equal(t1, t2) ((t1) == (t2))