about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/smp.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-11-02 12:26:42 +0000
committerJakub Jelinek <jakub@redhat.com>2004-11-02 12:26:42 +0000
commit80c96e8e6f452d6d9803f5a2e17030658f30afc4 (patch)
treeef584f35ed7167c7a680783415a66799c3789233 /nptl/sysdeps/unix/sysv/linux/smp.h
parent0b5cfa4e0b7c9dc2cd81635307613c86c0f5e200 (diff)
downloadglibc-80c96e8e6f452d6d9803f5a2e17030658f30afc4.tar.gz
glibc-80c96e8e6f452d6d9803f5a2e17030658f30afc4.tar.xz
glibc-80c96e8e6f452d6d9803f5a2e17030658f30afc4.zip
Updated to fedora-glibc-20041102T1153
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/smp.h')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/smp.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/smp.h b/nptl/sysdeps/unix/sysv/linux/smp.h
index 718fab683b..c1160a7939 100644
--- a/nptl/sysdeps/unix/sysv/linux/smp.h
+++ b/nptl/sysdeps/unix/sysv/linux/smp.h
@@ -20,6 +20,7 @@
 #include <fcntl.h>
 #include <string.h>
 #include <sys/sysctl.h>
+#include <not-cancel.h>
 
 /* Test whether the machine has more than one processor.  This is not the
    best test but good enough.  More complicated tests would require `malloc'
@@ -37,13 +38,13 @@ is_smp_system (void)
 		buf, &reslen, NULL, 0) < 0)
     {
       /* This was not successful.  Now try reading the /proc filesystem.  */
-      int fd = __open ("/proc/sys/kernel/version", O_RDONLY);
+      int fd = open_not_cancel_2 ("/proc/sys/kernel/version", O_RDONLY);
       if (__builtin_expect (fd, 0) == -1
-	  || (reslen = __read (fd, buf, sizeof (buf))) <= 0)
+	  || (reslen = read_not_cancel (fd, buf, sizeof (buf))) <= 0)
 	/* This also didn't work.  We give up and say it's a UP machine.  */
 	buf[0] = '\0';
 
-      __close (fd);
+      close_not_cancel_no_status (fd);
     }
 
   return strstr (buf, "SMP") != NULL;