diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-09-17 18:23:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-09-17 18:23:49 +0000 |
commit | 06f6ca9019897f5d1799c0ae8d7293ed249c0f97 (patch) | |
tree | 9a04e5058de47ce0898cf279205c8e58735efb96 /linuxthreads/attr.c | |
parent | 65af7e61427ce9bbbc0e43b2ad44e5b4678a37fc (diff) | |
download | glibc-06f6ca9019897f5d1799c0ae8d7293ed249c0f97.zip glibc-06f6ca9019897f5d1799c0ae8d7293ed249c0f97.tar.gz glibc-06f6ca9019897f5d1799c0ae8d7293ed249c0f97.tar.bz2 |
Update.
2003-09-17 Philip Blundell <philb@gnu.org>
* sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
libpthread is loaded. Elide backwards compatibility code when not
required.
Diffstat (limited to 'linuxthreads/attr.c')
-rw-r--r-- | linuxthreads/attr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/linuxthreads/attr.c b/linuxthreads/attr.c index a66eb72..687334f 100644 --- a/linuxthreads/attr.c +++ b/linuxthreads/attr.c @@ -404,7 +404,11 @@ int pthread_getattr_np (pthread_t thread, pthread_attr_t *attr) # endif #endif +#ifdef USE_TLS if (attr->__stackaddr == NULL) +#else + if (descr == &__pthread_initial_thread) +#endif { /* Defined in ld.so. */ extern void *__libc_stack_end; @@ -448,6 +452,11 @@ int pthread_getattr_np (pthread_t thread, pthread_attr_t *attr) attr->__stacksize = rl.rlim_cur; attr->__stackaddr = (void *) to; + /* The limit might be too high. This is a bogus + situation but try to avoid making it worse. */ + if ((size_t) attr->__stacksize > (size_t) attr->__stackaddr) + attr->__stacksize = (size_t) attr->__stackaddr; + /* We succeed and no need to look further. */ ret = 0; break; |