Blame rt/clock_nanosleep.c

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