about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/clock_nanosleep.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /sysdeps/unix/sysv/linux/clock_nanosleep.c
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'sysdeps/unix/sysv/linux/clock_nanosleep.c')
-rw-r--r--sysdeps/unix/sysv/linux/clock_nanosleep.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/sysdeps/unix/sysv/linux/clock_nanosleep.c b/sysdeps/unix/sysv/linux/clock_nanosleep.c
index 7645262cee..2a3dd411a1 100644
--- a/sysdeps/unix/sysv/linux/clock_nanosleep.c
+++ b/sysdeps/unix/sysv/linux/clock_nanosleep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003 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
@@ -17,11 +17,9 @@
    02111-1307 USA.  */
 
 #include <time.h>
-#include <errno.h>
 
 #include <sysdep-cancel.h>
-#include <kernel-features.h>
-#include "kernel-posix-cpu-timers.h"
+#include "kernel-features.h"
 
 
 #ifdef __ASSUME_POSIX_TIMERS
@@ -34,11 +32,6 @@ clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
   INTERNAL_SYSCALL_DECL (err);
   int r;
 
-  if (clock_id == CLOCK_THREAD_CPUTIME_ID)
-    return EINVAL;
-  if (clock_id == CLOCK_PROCESS_CPUTIME_ID)
-    clock_id = MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED);
-
   if (SINGLE_THREAD_P)
     r = INTERNAL_SYSCALL (clock_nanosleep, err, 4, clock_id, flags, req, rem);
   else
@@ -65,20 +58,12 @@ extern int __libc_missing_posix_timers attribute_hidden;
 #  define SYSDEP_NANOSLEEP \
   if (!__libc_missing_posix_timers)					      \
     {									      \
-      clockid_t syscall_clockid;					      \
       INTERNAL_SYSCALL_DECL (err);					      \
 									      \
-      if (clock_id == CLOCK_THREAD_CPUTIME_ID)				      \
-	return EINVAL;							      \
-      if (clock_id == CLOCK_PROCESS_CPUTIME_ID)				      \
-	syscall_clockid = MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED);	      \
-      else								      \
-	syscall_clockid = clock_id;					      \
-									      \
       int oldstate = LIBC_CANCEL_ASYNC ();				      \
 									      \
-      int r = INTERNAL_SYSCALL (clock_nanosleep, err, 4,		      \
-				syscall_clockid, flags, req, rem);	      \
+      int r = INTERNAL_SYSCALL (clock_nanosleep, err, 4, clock_id, flags,     \
+				req, rem);				      \
 									      \
       LIBC_CANCEL_RESET (oldstate);					      \
 									      \