2 * \file dietlibc/lib/backends/simple_sleep/sleep.c
6 * \author Martin Pohlack <mp26@os.inf.tu-dresden.de>
9 * (c) 2004-2009 Technische Universität Dresden
10 * This file is part of TUD:OS and distributed under the terms of the
11 * GNU Lesser General Public License 2.1.
12 * Please see the COPYING-LGPL-2.1 file for details.
18 #include <l4/util/util.h>
20 int nanosleep(const struct timespec *req, struct timespec *rem)
27 errno = EFAULT; // or maybe EINVAL ???
31 if (req->tv_nsec < 0 || req->tv_nsec > 999999999 || req->tv_sec < 0)
37 milis = (req->tv_sec * 1000) + (req->tv_nsec / 1000000);