diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-07-17 08:32:35 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-07-17 08:32:35 +0000 |
commit | 2706ee382341eb1c2e5f96c7d90f346696dbd0d8 (patch) | |
tree | c29690519bcb43604d9e0affa936aa7a2798660a /sysdeps | |
parent | 23700036397721389b90ac41571d68df2f26ad67 (diff) | |
download | glibc-2706ee382341eb1c2e5f96c7d90f346696dbd0d8.tar glibc-2706ee382341eb1c2e5f96c7d90f346696dbd0d8.tar.gz glibc-2706ee382341eb1c2e5f96c7d90f346696dbd0d8.tar.bz2 glibc-2706ee382341eb1c2e5f96c7d90f346696dbd0d8.zip |
Update.
2001-07-17 Ulrich Drepper <drepper@redhat.com>
* inet/rcmd.c (iruserfopen): Disable implicit locking for the stream.
* inet/ruserpass.c (ruserpass): Likewise.
* nss/nsswitch.c (nss_parse_file): Likewise.
* resolv/res_hconf.c (_res_hconf_init): Likewise.
* resolv/res_init.c (__res_vinit): Likewise.
* gmon/bb_exit_func.c (__bb_exit_func): Likewise.
* misc/getpass.c (getpass): Likewise.
* misc/getusershell.c (initshells): Likewise.
* misc/getttyent.c (setttyent): Likewise.
* misc/mntent_r.c (__setmntent): Likewise.
* time/getdate.c (__getdate_r): Likewise.
* time/tzfile.c (__tzfile_read): Likewise.
* iconv/gconv_conf.c (read_conf_file): Likewise.
* intl/localealias.c (read_alias_file): Disable implicit locking
for the stream. Use _unlocked functions for glibc.
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Disable
implicit locking for the stream.
(__get_nprocs_conf): Likewise.
(phys_pages_info): Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/getsysstats.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c index 08d676200d..bf39bd9661 100644 --- a/sysdeps/unix/sysv/linux/getsysstats.c +++ b/sysdeps/unix/sysv/linux/getsysstats.c @@ -24,6 +24,7 @@ #include <mntent.h> #include <paths.h> #include <stdio.h> +#include <stdio_ext.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -151,6 +152,8 @@ __get_nprocs () fp = fopen (proc_cpuinfo, "r"); if (fp != NULL) { + /* No threads use this stream. */ + __fsetlocking (fp, FSETLOCKING_BYCALLER); GET_NPROCS_PARSER (fp, buffer, result); fclose (fp); } @@ -186,6 +189,8 @@ __get_nprocs_conf () fp = fopen (proc_cpuinfo, "r"); if (fp != NULL) { + /* No threads use this stream. */ + __fsetlocking (fp, FSETLOCKING_BYCALLER); GET_NPROCS_CONF_PARSER (fp, buffer, result); fclose (fp); } @@ -224,6 +229,9 @@ phys_pages_info (const char *format) fp = fopen (proc_meminfo, "r"); if (fp != NULL) { + /* No threads use this stream. */ + __fsetlocking (fp, FSETLOCKING_BYCALLER); + result = 0; /* Read all lines and count the lines starting with the string "processor". We don't have to fear extremely long |