Skip to content

Commit

Permalink
Don't call uname or getrlimit in libpthread init function
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schwab committed Jun 10, 2010
1 parent 79f7625 commit cde99cd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
1 change: 1 addition & 0 deletions nptl/Versions
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ libc {
GLIBC_PRIVATE {
# Internal libc interface to libpthread
__libc_dl_error_tsd;
__getrlimit;
}
}

Expand Down
2 changes: 1 addition & 1 deletion nptl/nptl-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
6 changes: 6 additions & 0 deletions nptl/sysdeps/unix/sysv/linux/i386/Versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
libc {
GLIBC_PRIVATE {
# Internal libc interface to libpthread
__uname;
}
}
2 changes: 1 addition & 1 deletion nptl/sysdeps/unix/sysv/linux/i386/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit cde99cd

Please sign in to comment.