about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-10-24 14:50:46 -0700
committerRoland McGrath <roland@hack.frob.com>2012-10-24 14:50:46 -0700
commit6e6249d0b461b952d0f544792372663feb6d792a (patch)
tree555d1ac3a5e2ca9030d15f2e1760aea1a2e69ba7 /sysdeps/unix/sysv
parent0cae3f4b033e441d820f4521fa5736e4e6e4d713 (diff)
downloadglibc-6e6249d0b461b952d0f544792372663feb6d792a.tar.gz
glibc-6e6249d0b461b952d0f544792372663feb6d792a.tar.xz
glibc-6e6249d0b461b952d0f544792372663feb6d792a.zip
BZ#14743: Move clock_* symbols from librt to libc.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/clock_getcpuclockid.c1
-rw-r--r--sysdeps/unix/sysv/linux/clock_nanosleep.c1
-rw-r--r--sysdeps/unix/sysv/linux/i386/get_clockfreq.c8
-rw-r--r--sysdeps/unix/sysv/linux/i386/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/sh/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c30
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist5
15 files changed, 72 insertions, 20 deletions
diff --git a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
index 8700354a92..c00f5ea064 100644
--- a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
+++ b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
@@ -50,3 +50,4 @@ clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
   else
     return INTERNAL_SYSCALL_ERRNO (r, err);
 }
+strong_alias (clock_getcpuclockid, __clock_getcpuclockid)
diff --git a/sysdeps/unix/sysv/linux/clock_nanosleep.c b/sysdeps/unix/sysv/linux/clock_nanosleep.c
index 110296363a..b12bd868f2 100644
--- a/sysdeps/unix/sysv/linux/clock_nanosleep.c
+++ b/sysdeps/unix/sysv/linux/clock_nanosleep.c
@@ -52,3 +52,4 @@ clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
   return (INTERNAL_SYSCALL_ERROR_P (r, err)
 	  ? INTERNAL_SYSCALL_ERRNO (r, err) : 0);
 }
+strong_alias (clock_nanosleep, __clock_nanosleep)
diff --git a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c b/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
index 821e35e4c2..920b0d553e 100644
--- a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
+++ b/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
@@ -1,5 +1,5 @@
 /* Get frequency of the system processor.  i386/Linux version.
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -39,7 +39,7 @@ __get_clockfreq (void)
   if (result != 0)
     return result;
 
-  fd = open ("/proc/cpuinfo", O_RDONLY);
+  fd = __open ("/proc/cpuinfo", O_RDONLY);
   if (__builtin_expect (fd != -1, 1))
     {
       /* XXX AFAIK the /proc filesystem can generate "files" only up
@@ -47,7 +47,7 @@ __get_clockfreq (void)
       char buf[4096];
       ssize_t n;
 
-      n = read (fd, buf, sizeof buf);
+      n = __read (fd, buf, sizeof buf);
       if (__builtin_expect (n, 1) > 0)
 	{
 	  char *mhz = memmem (buf, n, "cpu MHz", 7);
@@ -83,7 +83,7 @@ __get_clockfreq (void)
 	    }
 	}
 
-      close (fd);
+      __close (fd);
     }
 
   return result;
diff --git a/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist b/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist
index 0e8576fdd5..67d592959b 100644
--- a/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist
@@ -1813,6 +1813,11 @@ GLIBC_2.16
  timespec_get F
 GLIBC_2.17
  GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
  secure_getenv F
 GLIBC_2.2
  GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile
index 6bdf4dc7f5..4ff7e849c3 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Makefile
+++ b/sysdeps/unix/sysv/linux/powerpc/Makefile
@@ -19,6 +19,6 @@ endif
 
 ifeq ($(subdir),misc)
 sysdep_headers += bits/ppc.h
-sysdep_routines += get_clockfreq get_timebase_freq
+sysdep_routines += get_timebase_freq
 tests += test-gettimebasefreq
 endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
index ab96361d40..a3cd89540d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
@@ -1774,6 +1774,11 @@ GLIBC_2.16
  timespec_get F
 GLIBC_2.17
  GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
  secure_getenv F
  __ppc_get_timebase_freq F
 GLIBC_2.2
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
index a60b72ad1a..0a80d0c57d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
@@ -80,6 +80,11 @@ GLIBC_2.16
  timespec_get F
 GLIBC_2.17
  GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
  secure_getenv F
  __ppc_get_timebase_freq F
 GLIBC_2.3
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist
index ff0b82f51f..d9914ff53f 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist
@@ -1765,6 +1765,11 @@ GLIBC_2.16
  timespec_get F
 GLIBC_2.17
  GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
  secure_getenv F
 GLIBC_2.2
  GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
index 2fb0786942..ef1ead3069 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
@@ -86,6 +86,11 @@ GLIBC_2.16
  timespec_get F
 GLIBC_2.17
  GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
  secure_getenv F
 GLIBC_2.2
  GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist
index 3fd150e7e5..733b550fee 100644
--- a/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist
@@ -86,6 +86,11 @@ GLIBC_2.16
  timespec_get F
 GLIBC_2.17
  GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
  secure_getenv F
 GLIBC_2.2
  GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist
index 7d5a3429fd..3a96ea883b 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist
@@ -1770,6 +1770,11 @@ GLIBC_2.16
  timespec_get F
 GLIBC_2.17
  GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
  secure_getenv F
 GLIBC_2.2
  GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c b/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
index cbb817952e..67ff77fa8c 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
@@ -34,13 +34,13 @@ __get_clockfreq_via_cpuinfo (void)
 
   result = 0;
 
-  fd = open ("/proc/cpuinfo", O_RDONLY);
+  fd = __open ("/proc/cpuinfo", O_RDONLY);
   if (fd != -1)
     {
       char buf[8192];
       ssize_t n;
 
-      n = read (fd, buf, sizeof buf);
+      n = __read (fd, buf, sizeof buf);
       if (n > 0)
 	{
 	  char *mhz = memmem (buf, n, "Cpu0ClkTck", 7);
@@ -72,7 +72,7 @@ __get_clockfreq_via_cpuinfo (void)
 	    }
 	}
 
-      close (fd);
+      __close (fd);
     }
 
   return result;
@@ -86,7 +86,7 @@ __get_clockfreq_via_proc_openprom (void)
 
   result = 0;
 
-  obp_fd = open ("/proc/openprom", O_RDONLY);
+  obp_fd = __open ("/proc/openprom", O_RDONLY);
   if (obp_fd != -1)
     {
       unsigned long int buf[4096 / sizeof (unsigned long int)];
@@ -94,8 +94,8 @@ __get_clockfreq_via_proc_openprom (void)
       off_t dbase = (off_t) 0;
       ssize_t len;
 
-      while ((len = getdirentries (obp_fd, (char *) dirp,
-				   sizeof (buf), &dbase)) > 0)
+      while ((len = __getdirentries (obp_fd, (char *) dirp,
+                                     sizeof (buf), &dbase)) > 0)
 	{
 	  struct dirent *this_dirp = dirp;
 
@@ -113,13 +113,13 @@ __get_clockfreq_via_proc_openprom (void)
 	      __stpcpy (prop = __stpcpy (__stpcpy (node, "/proc/openprom/"),
 					 this_dirp->d_name),
 			"/device_type");
-	      fd = open (node, O_RDONLY);
+	      fd = __open (node, O_RDONLY);
 	      if (fd != -1)
 		{
 		  char type_string[128];
 		  int ret;
 
-		  ret = read (fd, type_string, sizeof (type_string));
+		  ret = __read (fd, type_string, sizeof (type_string));
 		  if (ret > 0 && strncmp (type_string, "'cpu'", 5) == 0)
 		    {
 		      int clkfreq_fd;
@@ -135,7 +135,7 @@ __get_clockfreq_via_proc_openprom (void)
 			  close (clkfreq_fd);
 			}
 		    }
-		  close (fd);
+		  __close (fd);
 		}
 
 	      if (result != 0)
@@ -148,7 +148,7 @@ __get_clockfreq_via_proc_openprom (void)
 	  if (result != 0)
 	    break;
 	}
-      close (obp_fd);
+      __close (obp_fd);
     }
 
   return result;
@@ -178,7 +178,7 @@ __get_clockfreq_via_dev_openprom (void)
 
   result = 0;
 
-  obp_dev_fd = open ("/dev/openprom", O_RDONLY);
+  obp_dev_fd = __open ("/dev/openprom", O_RDONLY);
   if (obp_dev_fd != -1)
     {
       char obp_buf[8192];
@@ -188,7 +188,7 @@ __get_clockfreq_via_dev_openprom (void)
       obp_cmd->oprom_size =
 	sizeof (obp_buf) - sizeof (unsigned int);
       set_obp_int (obp_cmd, 0);
-      ret = ioctl (obp_dev_fd, OPROMCHILD, (char *) obp_cmd);
+      ret = __ioctl (obp_dev_fd, OPROMCHILD, (char *) obp_cmd);
       if (ret == 0)
 	{
 	  int cur_node = get_obp_int (obp_cmd);
@@ -197,20 +197,20 @@ __get_clockfreq_via_dev_openprom (void)
 	    {
 	      obp_cmd->oprom_size = sizeof (obp_buf) - sizeof (unsigned int);
 	      strcpy (obp_cmd->oprom_array, "device_type");
-	      ret = ioctl (obp_dev_fd, OPROMGETPROP, (char *) obp_cmd);
+	      ret = __ioctl (obp_dev_fd, OPROMGETPROP, (char *) obp_cmd);
 	      if (ret == 0
 		  && strncmp (obp_cmd->oprom_array, "cpu", 3) == 0)
 		{
 		  obp_cmd->oprom_size = (sizeof (obp_buf)
 					 - sizeof (unsigned int));
 		  strcpy (obp_cmd->oprom_array, "clock-frequency");
-		  ret = ioctl (obp_dev_fd, OPROMGETPROP, (char *) obp_cmd);
+		  ret = __ioctl (obp_dev_fd, OPROMGETPROP, (char *) obp_cmd);
 		  if (ret == 0)
 		    result = (hp_timing_t) get_obp_int (obp_cmd);
 		}
 	      obp_cmd->oprom_size = sizeof (obp_buf) - sizeof (unsigned int);
 	      set_obp_int (obp_cmd, cur_node);
-	      ret = ioctl (obp_dev_fd, OPROMNEXT, (char *) obp_cmd);
+	      ret = __ioctl (obp_dev_fd, OPROMNEXT, (char *) obp_cmd);
 	      if (ret < 0)
 		break;
 	      cur_node = get_obp_int (obp_cmd);
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist
index 6d6e57c114..aa892b8b8b 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist
@@ -91,6 +91,11 @@ GLIBC_2.16
  timespec_get F
 GLIBC_2.17
  GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
  secure_getenv F
 GLIBC_2.2
  GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist
index d6ab153e19..a42d424cde 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist
@@ -82,6 +82,11 @@ GLIBC_2.16
  timespec_get F
 GLIBC_2.17
  GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
  secure_getenv F
 GLIBC_2.2.5
  GLIBC_2.2.5 A
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist
index 65bcead8bc..108b80fb43 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist
@@ -2080,4 +2080,9 @@ GLIBC_2.16
  xprt_unregister F
 GLIBC_2.17
  GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
  secure_getenv F