From 93a78ac437ba44f493333d7e2a4b0249839ce460 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 16 Aug 2012 14:03:43 +0000 Subject: Remove __ASSUME_POSIX_TIMERS. --- sysdeps/unix/sysv/linux/clock_nanosleep.c | 43 +------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) (limited to 'sysdeps/unix/sysv/linux/clock_nanosleep.c') diff --git a/sysdeps/unix/sysv/linux/clock_nanosleep.c b/sysdeps/unix/sysv/linux/clock_nanosleep.c index e003ba21e6..110296363a 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-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 @@ -23,7 +23,6 @@ #include "kernel-posix-cpu-timers.h" -#ifdef __ASSUME_POSIX_TIMERS /* We can simply use the syscall. The CPU clocks are not supported with this function. */ int @@ -53,43 +52,3 @@ 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); } - -#else -# ifdef __NR_clock_nanosleep -/* Is the syscall known to exist? */ -extern int __libc_missing_posix_timers attribute_hidden; - -/* The REALTIME and MONOTONIC clock might be available. Try the - syscall first. */ -# 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); \ - \ - LIBC_CANCEL_RESET (oldstate); \ - \ - if (!INTERNAL_SYSCALL_ERROR_P (r, err)) \ - return 0; \ - \ - if (INTERNAL_SYSCALL_ERRNO (r, err) != ENOSYS) \ - return INTERNAL_SYSCALL_ERRNO (r, err); \ - \ - __libc_missing_posix_timers = 1; \ - } -# endif - -# include -#endif -- cgit 1.4.1