X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_attr_get.c;h=f12ff442548dd65e85410a2606bb2904f511b256;hb=1e4204d522670a1d8b8ab85f1cfefa960547e8af;hp=3d296bf3a5e3164ec633133737e74b90fdde4faa;hpb=bc09d58c0432a4eca5f6a1e536679a527f971116;p=musl diff --git a/src/thread/pthread_attr_get.c b/src/thread/pthread_attr_get.c index 3d296bf3..f12ff442 100644 --- a/src/thread/pthread_attr_get.c +++ b/src/thread/pthread_attr_get.c @@ -7,7 +7,7 @@ int pthread_attr_getdetachstate(const pthread_attr_t *a, int *state) } int pthread_attr_getguardsize(const pthread_attr_t *restrict a, size_t *restrict size) { - *size = a->_a_guardsize + DEFAULT_GUARD_SIZE; + *size = a->_a_guardsize; return 0; } @@ -39,14 +39,14 @@ int pthread_attr_getstack(const pthread_attr_t *restrict a, void **restrict addr { if (!a->_a_stackaddr) return EINVAL; - *size = a->_a_stacksize + DEFAULT_STACK_SIZE; + *size = a->_a_stacksize; *addr = (void *)(a->_a_stackaddr - *size); return 0; } int pthread_attr_getstacksize(const pthread_attr_t *restrict a, size_t *restrict size) { - *size = a->_a_stacksize + DEFAULT_STACK_SIZE; + *size = a->_a_stacksize; return 0; } @@ -70,7 +70,7 @@ int pthread_condattr_getpshared(const pthread_condattr_t *restrict a, int *restr int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, int *restrict protocol) { - *protocol = PTHREAD_PRIO_NONE; + *protocol = a->__attr / 8U % 2; return 0; } int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict a, int *restrict pshared)