summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-04-08 11:18:26 +0200
committerAndreas Schwab <schwab@redhat.com>2010-06-10 14:53:33 +0200
commitcde99cd2b7b16a6113acb054e89d490047932a9f (patch)
tree12213541c658d6257dbc8abc07b2247393b39628
parent79f76251ff8e058d661883c7f519efd41d15e7c0 (diff)
Don't call uname or getrlimit in libpthread init function
-rw-r--r--ChangeLog8
-rw-r--r--nptl/Versions1
-rw-r--r--nptl/nptl-init.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/Versions6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/smp.h2
5 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7eff3a8363..b2d74eaf59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-06-10 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
+ GLIBC_PRIVATE.
+ * nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
+ * sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
+ * nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
+
2010-05-28 Luis Machado <luisgpm@br.ibm.com>
* sysdeps/powerpc/powerpc32/power7/memcpy.S: Exchange srdi for srwi.
diff --git a/nptl/Versions b/nptl/Versions
index f74941fa92..52ca0bfee0 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -29,6 +29,7 @@ libc {
GLIBC_PRIVATE {
# Internal libc interface to libpthread
__libc_dl_error_tsd;
+ __getrlimit;
}
}
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 851bab2bf1..c663f21ba6 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -396,7 +396,7 @@ __pthread_initialize_minimal_internal (void)
/* Determine the default allowed stack size. This is the size used
in case the user does not specify one. */
struct rlimit limit;
- if (getrlimit (RLIMIT_STACK, &limit) != 0
+ if (__getrlimit (RLIMIT_STACK, &limit) != 0
|| limit.rlim_cur == RLIM_INFINITY)
/* The system limit is not usable. Use an architecture-specific
default. */
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/Versions b/nptl/sysdeps/unix/sysv/linux/i386/Versions
new file mode 100644
index 0000000000..9d53804cb1
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/i386/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_PRIVATE {
+ # Internal libc interface to libpthread
+ __uname;
+ }
+}
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/smp.h b/nptl/sysdeps/unix/sysv/linux/i386/smp.h
index f68a0c0758..bdff66555e 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/smp.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/smp.h
@@ -37,7 +37,7 @@ is_smp_system (void)
char *cp;
/* Try reading the number using `sysctl' first. */
- if (uname (&u.uts) == 0)
+ if (__uname (&u.uts) == 0)
cp = u.uts.version;
else
{