diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-12-27 08:32:00 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-12-27 08:32:00 +0000 |
commit | 5a7d27d4f98ff74f5b2ad4108d9092c3aaae6aa4 (patch) | |
tree | 2e685a3dd8afa784c062122f62988ccc7b228357 /linuxthreads/attr.c | |
parent | 38eb40ea11b26e12c1118ccd9d18889fc310c1fc (diff) | |
download | glibc-5a7d27d4f98ff74f5b2ad4108d9092c3aaae6aa4.zip glibc-5a7d27d4f98ff74f5b2ad4108d9092c3aaae6aa4.tar.gz glibc-5a7d27d4f98ff74f5b2ad4108d9092c3aaae6aa4.tar.bz2 |
(__pthread_attr_getstack): Return correct address.
Diffstat (limited to 'linuxthreads/attr.c')
-rw-r--r-- | linuxthreads/attr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linuxthreads/attr.c b/linuxthreads/attr.c index 9f7a191..580da03 100644 --- a/linuxthreads/attr.c +++ b/linuxthreads/attr.c @@ -258,7 +258,11 @@ int __pthread_attr_getstack (const pthread_attr_t *attr, void **stackaddr, /* XXX This function has a stupid definition. The standard specifies no error value but what is if no stack address was set? We simply return the value we have in the member. */ +#ifndef _STACK_GROWS_UP + *stackaddr = (char *) attr->__stackaddr - attr->__stacksize; +#else *stackaddr = attr->__stackaddr; +#endif *stacksize = attr->__stacksize; return 0; } |