|
|
29e444 |
From cde99cd2b7b16a6113acb054e89d490047932a9f Mon Sep 17 00:00:00 2001
|
|
|
29e444 |
From: Andreas Schwab <schwab@redhat.com>
|
|
|
29e444 |
Date: Thu, 8 Apr 2010 11:18:26 +0200
|
|
|
29e444 |
Subject: [PATCH] Don't call uname or getrlimit in libpthread init function
|
|
|
29e444 |
|
|
|
29e444 |
* sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
|
|
|
29e444 |
GLIBC_PRIVATE.
|
|
|
29e444 |
* nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
|
|
|
29e444 |
* sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
|
|
|
29e444 |
* nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
|
|
|
29e444 |
|
|
|
29e444 |
---
|
|
|
29e444 |
ChangeLog | 8 ++++++++
|
|
|
29e444 |
nptl/Versions | 1 +
|
|
|
29e444 |
nptl/nptl-init.c | 2 +-
|
|
|
29e444 |
nptl/sysdeps/unix/sysv/linux/i386/Versions | 6 ++++++
|
|
|
29e444 |
nptl/sysdeps/unix/sysv/linux/i386/smp.h | 2 +-
|
|
|
29e444 |
5 files changed, 17 insertions(+), 2 deletions(-)
|
|
|
29e444 |
create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/Versions
|
|
|
29e444 |
|
|
|
12745e |
--- glibc-2.17-c758a686/nptl/Version
|
|
|
12745e |
+++ glibc-2.17-c758a686/nptl/Versions
|
|
|
29e444 |
@@ -30,6 +30,7 @@ libc {
|
|
|
29e444 |
__libc_alloca_cutoff;
|
|
|
29e444 |
# Internal libc interface to libpthread
|
|
|
29e444 |
__libc_dl_error_tsd;
|
|
|
29e444 |
+ __getrlimit;
|
|
|
29e444 |
}
|
|
|
29e444 |
}
|
|
|
29e444 |
|
|
|
12745e |
--- glibc-2.17-c758a686/nptl/nptl-init.c
|
|
|
12745e |
+++ glibc-2.17-c758a686/nptl/nptl-init.c
|
|
|
29e444 |
@@ -414,7 +414,7 @@ __pthread_initialize_minimal_internal (void)
|
|
|
29e444 |
/* Determine the default allowed stack size. This is the size used
|
|
|
29e444 |
in case the user does not specify one. */
|
|
|
29e444 |
struct rlimit limit;
|
|
|
29e444 |
- if (getrlimit (RLIMIT_STACK, &limit) != 0
|
|
|
29e444 |
+ if (__getrlimit (RLIMIT_STACK, &limit) != 0
|
|
|
29e444 |
|| limit.rlim_cur == RLIM_INFINITY)
|
|
|
29e444 |
/* The system limit is not usable. Use an architecture-specific
|
|
|
29e444 |
default. */
|
|
|
12745e |
--- glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/Versions
|
|
|
12745e |
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/Versions
|
|
|
29e444 |
@@ -0,0 +1,6 @@
|
|
|
29e444 |
+libc {
|
|
|
29e444 |
+ GLIBC_PRIVATE {
|
|
|
29e444 |
+ # Internal libc interface to libpthread
|
|
|
29e444 |
+ __uname;
|
|
|
29e444 |
+ }
|
|
|
29e444 |
+}
|
|
|
12745e |
--- glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/smp.h
|
|
|
12745e |
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/smp.h
|
|
|
29e444 |
@@ -36,7 +36,7 @@ is_smp_system (void)
|
|
|
29e444 |
char *cp;
|
|
|
29e444 |
|
|
|
29e444 |
/* Try reading the number using `sysctl' first. */
|
|
|
29e444 |
- if (uname (&u.uts) == 0)
|
|
|
29e444 |
+ if (__uname (&u.uts) == 0)
|
|
|
29e444 |
cp = u.uts.version;
|
|
|
29e444 |
else
|
|
|
29e444 |
{
|