diff options
Diffstat (limited to 'pthread/pt-getattr.c')
-rw-r--r-- | pthread/pt-getattr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pthread/pt-getattr.c b/pthread/pt-getattr.c index edb013f..574420a 100644 --- a/pthread/pt-getattr.c +++ b/pthread/pt-getattr.c @@ -39,12 +39,12 @@ pthread_getattr_np (pthread_t thread, pthread_attr_t *attr) are not supported yet, so fill them with our default values. */ *attr = __pthread_default_attr; - attr->stackaddr = pthread->stackaddr + + attr->__stackaddr = pthread->stackaddr + ((pthread->guardsize + __vm_page_size-1) / __vm_page_size * __vm_page_size); - attr->stacksize = pthread->stacksize; - attr->guardsize = pthread->guardsize; - attr->detachstate = (pthread->state == PTHREAD_DETACHED + attr->__stacksize = pthread->stacksize; + attr->__guardsize = pthread->guardsize; + attr->__detachstate = (pthread->state == PTHREAD_DETACHED ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE); return 0; |