[libc-commits] [libc] [libc] Implement sleep and usleep for Linux (PR #205922)

Pavel Labath via libc-commits libc-commits at lists.llvm.org
Tue Jul 21 07:30:08 PDT 2026


================
@@ -0,0 +1,51 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// Implementation header for nanosleep syscall wrapper.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_OSUTIL_SYSCALL_WRAPPERS_NANOSLEEP_H
+#define LLVM_LIBC_SRC___SUPPORT_OSUTIL_SYSCALL_WRAPPERS_NANOSLEEP_H
+
+#include "hdr/sys_syscall_macros.h"
+#include "hdr/time_macros.h"
+#include "hdr/types/struct_timespec.h"
+#include "src/__support/OSUtil/linux/syscall.h" // syscall_impl
----------------
labath wrote:

```suggestion
#include "src/__support/OSUtil/linux/syscall.h" // syscall_checked
```

https://github.com/llvm/llvm-project/pull/205922


More information about the libc-commits mailing list