Blame time/clock_nanosleep.c

Packit Service f45677
/* High-resolution sleep with the specified clock.  Stub version.
Packit Service f45677
   Copyright (C) 2000-2018 Free Software Foundation, Inc.
Packit Service f45677
   This file is part of the GNU C Library.
Packit Service f45677
Packit Service f45677
   The GNU C Library is free software; you can redistribute it and/or
Packit Service f45677
   modify it under the terms of the GNU Lesser General Public
Packit Service f45677
   License as published by the Free Software Foundation; either
Packit Service f45677
   version 2.1 of the License, or (at your option) any later version.
Packit Service f45677
Packit Service f45677
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service f45677
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service f45677
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service f45677
   Lesser General Public License for more details.
Packit Service f45677
Packit Service f45677
   You should have received a copy of the GNU Lesser General Public
Packit Service f45677
   License along with the GNU C Library; if not, see
Packit Service f45677
   <http://www.gnu.org/licenses/>.  */
Packit Service f45677
Packit Service f45677
#include <errno.h>
Packit Service f45677
#include <time.h>
Packit Service 4fde04
#include <shlib-compat.h>
Packit Service f45677
Packit Service f45677
int
Packit Service f45677
__clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
Packit Service f45677
		   struct timespec *rem)
Packit Service f45677
{
Packit Service f45677
  if (__builtin_expect (req->tv_nsec, 0) < 0
Packit Service f45677
      || __builtin_expect (req->tv_nsec, 0) >= 1000000000)
Packit Service f45677
    return EINVAL;
Packit Service f45677
Packit Service f45677
  if (flags != TIMER_ABSTIME && flags != 0)
Packit Service f45677
    return EINVAL;
Packit Service f45677
Packit Service f45677
  /* Not implemented.  */
Packit Service f45677
  return ENOSYS;
Packit Service f45677
}
Packit Service 4fde04
Packit Service 4fde04
versioned_symbol (libc, __clock_nanosleep, clock_nanosleep, GLIBC_2_17);
Packit Service 4fde04
/* clock_nanosleep moved to libc in version 2.17;
Packit Service 4fde04
   old binaries may expect the symbol version it had in librt.  */
Packit Service 4fde04
#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
Packit Service 4fde04
strong_alias (__clock_nanosleep, __clock_nanosleep_2);
Packit Service 4fde04
compat_symbol (libc, __clock_nanosleep_2, clock_nanosleep, GLIBC_2_2);
Packit Service 4fde04
#endif
Packit Service 4fde04
Packit Service f45677
stub_warning (clock_nanosleep)