about summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog4
-rw-r--r--linuxthreads/attr.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 8bbbd6f4d1..55e3d0aef9 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,7 @@
+2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
+
+	* attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
+
 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/pthread/pthread.h (pthread_setcancelstate,
diff --git a/linuxthreads/attr.c b/linuxthreads/attr.c
index 56f6cba092..80f5249d36 100644
--- a/linuxthreads/attr.c
+++ b/linuxthreads/attr.c
@@ -455,12 +455,17 @@ int pthread_getattr_np (pthread_t thread, pthread_attr_t *attr)
 		{
 		  /* Found the entry.  Now we have the info we need.  */
 		  attr->__stacksize = rl.rlim_cur;
+#ifdef _STACK_GROWS_UP
+		  /* Don't check to enforce a limit on the __stacksize */
+		  attr->__stackaddr = (void *) from;
+#else
 		  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;
+#endif
 
 		  /* We succeed and no need to look further.  */
 		  ret = 0;