* [review] support: Fix support_set_small_thread_stack_size to build on Hurd
@ 2019-11-12 19:05 Florian Weimer (Code Review)
2019-11-13 13:08 ` Christian Brauner (Code Review)
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Florian Weimer (Code Review) @ 2019-11-12 19:05 UTC (permalink / raw)
To: libc-alpha; +Cc: Florian Weimer
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/620
......................................................................
support: Fix support_set_small_thread_stack_size to build on Hurd
PTHREAD_STACK_MIN comes from <limits.h>, so include it explicitly.
However, it is not defined on Hurd, so compensate for that as well.
Built on x86_64-linux-gnu, i686-linux-gnu, i686-gnu.
Change-Id: Ifacc888ef86731c2639721b0932ae59583bd6b3e
---
M support/support_set_small_thread_stack_size.c
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/support/support_set_small_thread_stack_size.c b/support/support_set_small_thread_stack_size.c
index 23189fd..32954ec 100644
--- a/support/support_set_small_thread_stack_size.c
+++ b/support/support_set_small_thread_stack_size.c
@@ -16,9 +16,9 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <limits.h>
#include <pthread.h>
#include <support/xthread.h>
-#include <sys/param.h>
void
support_set_small_thread_stack_size (pthread_attr_t *attr)
@@ -26,5 +26,10 @@
/* Some architectures have too small values for PTHREAD_STACK_MIN
which cannot be used for creating threads. Ensure that the stack
size is at least 256 KiB. */
- xpthread_attr_setstacksize (attr, MAX (256 * 1024, PTHREAD_STACK_MIN));
+ size_t stack_size = 256 * 1024;
+#ifdef PTHREAD_STACK_MIN
+ if (stack_size < PTHREAD_STACK_MIN)
+ stack_size = PTHREAD_STACK_MIN;
+#endif
+ xpthread_attr_setstacksize (attr, stack_size);
}
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: Ifacc888ef86731c2639721b0932ae59583bd6b3e
Gerrit-Change-Number: 620
Gerrit-PatchSet: 1
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-MessageType: newchange
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [review] support: Fix support_set_small_thread_stack_size to build on Hurd
2019-11-12 19:05 [review] support: Fix support_set_small_thread_stack_size to build on Hurd Florian Weimer (Code Review)
@ 2019-11-13 13:08 ` Christian Brauner (Code Review)
2019-11-13 13:09 ` [review v2] " Florian Weimer (Code Review)
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Christian Brauner (Code Review) @ 2019-11-13 13:08 UTC (permalink / raw)
To: Florian Weimer, libc-alpha
Christian Brauner has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/620
......................................................................
Patch Set 1: Code-Review+2
Looks reasonable.
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: Ifacc888ef86731c2639721b0932ae59583bd6b3e
Gerrit-Change-Number: 620
Gerrit-PatchSet: 1
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-Reviewer: Christian Brauner <christian.brauner@ubuntu.com>
Gerrit-Comment-Date: Wed, 13 Nov 2019 13:08:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
^ permalink raw reply [flat|nested] 5+ messages in thread
* [review v2] support: Fix support_set_small_thread_stack_size to build on Hurd
2019-11-12 19:05 [review] support: Fix support_set_small_thread_stack_size to build on Hurd Florian Weimer (Code Review)
2019-11-13 13:08 ` Christian Brauner (Code Review)
@ 2019-11-13 13:09 ` Florian Weimer (Code Review)
2019-11-13 13:11 ` Christian Brauner (Code Review)
2019-11-13 13:20 ` [pushed] " Sourceware to Gerrit sync (Code Review)
3 siblings, 0 replies; 5+ messages in thread
From: Florian Weimer (Code Review) @ 2019-11-13 13:09 UTC (permalink / raw)
To: Florian Weimer, Christian Brauner, libc-alpha
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/620
......................................................................
support: Fix support_set_small_thread_stack_size to build on Hurd
PTHREAD_STACK_MIN comes from <limits.h>, so include it explicitly.
However, it is not defined on Hurd, so compensate for that as well.
Built on x86_64-linux-gnu, i686-linux-gnu, i686-gnu.
Change-Id: Ifacc888ef86731c2639721b0932ae59583bd6b3e
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
---
M support/support_set_small_thread_stack_size.c
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/support/support_set_small_thread_stack_size.c b/support/support_set_small_thread_stack_size.c
index 23189fd..32954ec 100644
--- a/support/support_set_small_thread_stack_size.c
+++ b/support/support_set_small_thread_stack_size.c
@@ -16,9 +16,9 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <limits.h>
#include <pthread.h>
#include <support/xthread.h>
-#include <sys/param.h>
void
support_set_small_thread_stack_size (pthread_attr_t *attr)
@@ -26,5 +26,10 @@
/* Some architectures have too small values for PTHREAD_STACK_MIN
which cannot be used for creating threads. Ensure that the stack
size is at least 256 KiB. */
- xpthread_attr_setstacksize (attr, MAX (256 * 1024, PTHREAD_STACK_MIN));
+ size_t stack_size = 256 * 1024;
+#ifdef PTHREAD_STACK_MIN
+ if (stack_size < PTHREAD_STACK_MIN)
+ stack_size = PTHREAD_STACK_MIN;
+#endif
+ xpthread_attr_setstacksize (attr, stack_size);
}
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: Ifacc888ef86731c2639721b0932ae59583bd6b3e
Gerrit-Change-Number: 620
Gerrit-PatchSet: 2
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-Reviewer: Christian Brauner <christian.brauner@ubuntu.com>
Gerrit-MessageType: newpatchset
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [review v2] support: Fix support_set_small_thread_stack_size to build on Hurd
2019-11-12 19:05 [review] support: Fix support_set_small_thread_stack_size to build on Hurd Florian Weimer (Code Review)
2019-11-13 13:08 ` Christian Brauner (Code Review)
2019-11-13 13:09 ` [review v2] " Florian Weimer (Code Review)
@ 2019-11-13 13:11 ` Christian Brauner (Code Review)
2019-11-13 13:20 ` [pushed] " Sourceware to Gerrit sync (Code Review)
3 siblings, 0 replies; 5+ messages in thread
From: Christian Brauner (Code Review) @ 2019-11-13 13:11 UTC (permalink / raw)
To: Florian Weimer, libc-alpha
Christian Brauner has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/620
......................................................................
Patch Set 2: Code-Review+2
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: Ifacc888ef86731c2639721b0932ae59583bd6b3e
Gerrit-Change-Number: 620
Gerrit-PatchSet: 2
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-Reviewer: Christian Brauner <christian.brauner@ubuntu.com>
Gerrit-Comment-Date: Wed, 13 Nov 2019 13:11:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pushed] support: Fix support_set_small_thread_stack_size to build on Hurd
2019-11-12 19:05 [review] support: Fix support_set_small_thread_stack_size to build on Hurd Florian Weimer (Code Review)
` (2 preceding siblings ...)
2019-11-13 13:11 ` Christian Brauner (Code Review)
@ 2019-11-13 13:20 ` Sourceware to Gerrit sync (Code Review)
3 siblings, 0 replies; 5+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2019-11-13 13:20 UTC (permalink / raw)
To: Florian Weimer, libc-alpha; +Cc: Christian Brauner
Sourceware to Gerrit sync has submitted this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/620
......................................................................
support: Fix support_set_small_thread_stack_size to build on Hurd
PTHREAD_STACK_MIN comes from <limits.h>, so include it explicitly.
However, it is not defined on Hurd, so compensate for that as well.
Built on x86_64-linux-gnu, i686-linux-gnu, i686-gnu.
Change-Id: Ifacc888ef86731c2639721b0932ae59583bd6b3e
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
---
M support/support_set_small_thread_stack_size.c
1 file changed, 7 insertions(+), 2 deletions(-)
Approvals:
Christian Brauner: Looks good to me, approved
diff --git a/support/support_set_small_thread_stack_size.c b/support/support_set_small_thread_stack_size.c
index 23189fd..32954ec 100644
--- a/support/support_set_small_thread_stack_size.c
+++ b/support/support_set_small_thread_stack_size.c
@@ -16,9 +16,9 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <limits.h>
#include <pthread.h>
#include <support/xthread.h>
-#include <sys/param.h>
void
support_set_small_thread_stack_size (pthread_attr_t *attr)
@@ -26,5 +26,10 @@
/* Some architectures have too small values for PTHREAD_STACK_MIN
which cannot be used for creating threads. Ensure that the stack
size is at least 256 KiB. */
- xpthread_attr_setstacksize (attr, MAX (256 * 1024, PTHREAD_STACK_MIN));
+ size_t stack_size = 256 * 1024;
+#ifdef PTHREAD_STACK_MIN
+ if (stack_size < PTHREAD_STACK_MIN)
+ stack_size = PTHREAD_STACK_MIN;
+#endif
+ xpthread_attr_setstacksize (attr, stack_size);
}
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: Ifacc888ef86731c2639721b0932ae59583bd6b3e
Gerrit-Change-Number: 620
Gerrit-PatchSet: 3
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-Reviewer: Christian Brauner <christian.brauner@ubuntu.com>
Gerrit-MessageType: merged
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-13 13:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 19:05 [review] support: Fix support_set_small_thread_stack_size to build on Hurd Florian Weimer (Code Review)
2019-11-13 13:08 ` Christian Brauner (Code Review)
2019-11-13 13:09 ` [review v2] " Florian Weimer (Code Review)
2019-11-13 13:11 ` Christian Brauner (Code Review)
2019-11-13 13:20 ` [pushed] " Sourceware to Gerrit sync (Code Review)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).