LibPthread: Add implementation for pthread_mutexattr_gettype

This commit is contained in:
Gunnar Beutner 2021-05-08 04:49:36 +02:00 committed by Andreas Kling
parent 7fea58c4f1
commit 6e80b9fd01
Notes: sideshowbarker 2024-07-18 18:30:01 +09:00
2 changed files with 7 additions and 0 deletions

View file

@ -196,6 +196,12 @@ int pthread_mutexattr_settype(pthread_mutexattr_t* attr, int type)
return 0;
}
int pthread_mutexattr_gettype(pthread_mutexattr_t* attr, int* type)
{
*type = attr->type;
return 0;
}
int pthread_attr_init(pthread_attr_t* attributes)
{
auto* impl = new PthreadAttrImpl {};

View file

@ -112,6 +112,7 @@ int pthread_detach(pthread_t);
int pthread_equal(pthread_t, pthread_t);
int pthread_mutexattr_init(pthread_mutexattr_t*);
int pthread_mutexattr_settype(pthread_mutexattr_t*, int);
int pthread_mutexattr_gettype(pthread_mutexattr_t*, int*);
int pthread_mutexattr_destroy(pthread_mutexattr_t*);
int pthread_setname_np(pthread_t, const char*);