about summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-12-27 08:05:00 +0000
committerUlrich Drepper <drepper@redhat.com>2000-12-27 08:05:00 +0000
commite8a5cd43ab1ddc50ca68d43ba9202fdb8ef32fff (patch)
tree2c7ae3ce1a4cf0d6092d29c656bfd2143a5aee06 /linuxthreads
parent03bac9acadcafeef0fcdc38719844167c77f412d (diff)
downloadglibc-e8a5cd43ab1ddc50ca68d43ba9202fdb8ef32fff.tar.gz
glibc-e8a5cd43ab1ddc50ca68d43ba9202fdb8ef32fff.tar.xz
glibc-e8a5cd43ab1ddc50ca68d43ba9202fdb8ef32fff.zip
(__pthread_attr_setstack): Fix setting of __stackaddr element. Add warnings for using pthread_attr_getstackaddr and pthread_attr_setstackaddr.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/attr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/linuxthreads/attr.c b/linuxthreads/attr.c
index 1aeac54ff1..9f7a191ec6 100644
--- a/linuxthreads/attr.c
+++ b/linuxthreads/attr.c
@@ -169,6 +169,9 @@ int __pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
 }
 weak_alias (__pthread_attr_setstackaddr, pthread_attr_setstackaddr)
 
+link_warning (pthread_attr_setstackaddr,
+	      "the use of `pthread_attr_setstackaddr' is deprecated, use `pthread_attr_setstack'")
+
 int __pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr)
 {
   /* XXX This function has a stupid definition.  The standard specifies
@@ -179,6 +182,10 @@ int __pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr)
 }
 weak_alias (__pthread_attr_getstackaddr, pthread_attr_getstackaddr)
 
+link_warning (pthread_attr_getstackaddr,
+	      "the use of `pthread_attr_getstackaddr' is deprecated, use `pthread_attr_getstack'")
+
+
 int __pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
 {
 #ifdef FLOATING_STACKS
@@ -233,7 +240,7 @@ int __pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr,
     err = __pthread_attr_setstacksize (attr, stacksize);
   if (err == 0)
     {
-#ifdef _STACK_GROWS_UP
+#ifndef _STACK_GROWS_UP
       attr->__stackaddr = (char *) stackaddr + stacksize;
 #else
       attr->__stackaddr = stackaddr;