diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-06-16 18:47:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-06-16 18:47:49 +0000 |
commit | cc765c2a2e1ab7702080b7fd2f0a7b21d8ac60ff (patch) | |
tree | 6f8ce94483cd5a47aebac0c6ced2904ea9670d42 /linuxthreads/internals.h | |
parent | 81dacf8ac44e44187fc0b90b75e28b032a8b14ac (diff) | |
download | glibc-cc765c2a2e1ab7702080b7fd2f0a7b21d8ac60ff.tar.gz glibc-cc765c2a2e1ab7702080b7fd2f0a7b21d8ac60ff.tar.xz glibc-cc765c2a2e1ab7702080b7fd2f0a7b21d8ac60ff.zip |
Make _STACK_GROWS_UP work.
Diffstat (limited to 'linuxthreads/internals.h')
-rw-r--r-- | linuxthreads/internals.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h index aeb45aae01..a78f9b671b 100644 --- a/linuxthreads/internals.h +++ b/linuxthreads/internals.h @@ -384,7 +384,11 @@ static inline pthread_descr thread_self (void) else if (__pthread_nonstandard_stacks) return __pthread_find_self(); else +#ifdef _STACK_GROWS_DOWN return (pthread_descr)(((unsigned long)sp | (STACK_SIZE-1))+1) - 1; +#else + return (pthread_descr)((unsigned long)sp &~ (STACK_SIZE-1)); +#endif #endif } |