X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_attr_get.c;h=4aa5afdb2881c6ae3aa344784b83b619d76e5a6b;hb=8c4be3e2209d2a1d3874b8bc2b474668fcbbbac6;hp=03fc91e38c103a26766f4a058d226a05f947eb6a;hpb=0109d950e685f1c5f6cef245a8b1bc47c9b6d94c;p=musl diff --git a/src/thread/pthread_attr_get.c b/src/thread/pthread_attr_get.c index 03fc91e3..4aa5afdb 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; } @@ -75,7 +75,7 @@ int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, int *re } int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict a, int *restrict pshared) { - *pshared = a->__attr>>31; + *pshared = a->__attr / 128U % 2; return 0; }