]> sourceware.org Git - glibc.git/commitdiff
Use __pthread_get_minstack in more places
authorUlrich Drepper <drepper@gmail.com>
Fri, 23 Dec 2011 03:58:17 +0000 (22:58 -0500)
committerUlrich Drepper <drepper@gmail.com>
Fri, 23 Dec 2011 03:58:17 +0000 (22:58 -0500)
nptl/ChangeLog
nptl/sysdeps/pthread/gai_misc.h
nptl/sysdeps/unix/sysv/linux/mq_notify.c

index 3d697da95faa5e251188b761eb4d49a4ce052299..e8ff69ab008053a5e11954adc99148d0291db8fe 100644 (file)
@@ -1,5 +1,9 @@
 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
 
+       * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
+       __pthread_get_minstack.
+       * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
+
        [BZ #13088]
        * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
        through __pthread_get_minstack.
index 9094c1e37b92339ca26022edcfbd10838eba3734..cbbe47657b01b29f6933ea364b18782bb85d8127 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2007, 2008, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -97,7 +97,9 @@ __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
   pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
 
   /* The helper thread needs only very little resources.  */
-  (void) pthread_attr_setstacksize (&attr, 4 * PTHREAD_STACK_MIN);
+  (void) pthread_attr_setstacksize (&attr,
+                                   __pthread_get_minstack (&attr)
+                                   + 4 * PTHREAD_STACK_MIN);
 
   /* Block all signals in the helper thread.  To do this thoroughly we
      temporarily have to block all signals here.  */
index 49ddeae052c0be3601f5cd73d4bf6850f7a25c54..11ffc328e70ce6b4a031e1e929f6658471dd78f0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2008, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contribute by Ulrich Drepper <drepper@redhat.com>, 2004.
 
@@ -201,7 +201,7 @@ init_mq_netlink (void)
       (void) pthread_attr_init (&attr);
       (void) pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
       /* We do not need much stack space, the bare minimum will be enough.  */
-      (void) pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
+      (void) pthread_attr_setstacksize (&attr, __pthread_get_minstack (&attr));
 
       /* Temporarily block all signals so that the newly created
         thread inherits the mask.  */
This page took 0.053467 seconds and 5 git commands to generate.