[libc-commits] [libc] [libc][POSIX] Add clock_settime() function for NVPTX targets (PR #168494)

Anton Shepelev via libc-commits libc-commits at lists.llvm.org
Mon Nov 17 23:06:28 PST 2025


https://github.com/amemov created https://github.com/llvm/llvm-project/pull/168494

Closes #168492



>From 66004d397ab93996a400bee25e8d571e6af4ebfd Mon Sep 17 00:00:00 2001
From: amemov <shepelev777 at gmail.com>
Date: Mon, 17 Nov 2025 23:05:07 -0800
Subject: [PATCH] WIP: Created file for GPU implementation

---
 libc/docs/headers/time.rst          | 2 +-
 libc/src/time/gpu/clock_settime.cpp | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 libc/src/time/gpu/clock_settime.cpp

diff --git a/libc/docs/headers/time.rst b/libc/docs/headers/time.rst
index f07e0d93a4ce6..d1030ca339a61 100644
--- a/libc/docs/headers/time.rst
+++ b/libc/docs/headers/time.rst
@@ -71,7 +71,7 @@ Implementation Status
 +---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
 | clock_nanosleep     |         |         |         |                 |         |         |         |         |         |         |         |         |         |
 +---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
-| clock_settime       | |check| | |check| |         |     |check|     |         |         |         |         |         |         |         |         |         |
+| clock_settime       | |check| | |check| |         |     |check|     |         |         |         |         |         |         |         |         | |check| |
 +---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
 | ctime               | |check| | |check| |         |     |check|     |         |         |         |         |         |         |         |         |         |
 +---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
diff --git a/libc/src/time/gpu/clock_settime.cpp b/libc/src/time/gpu/clock_settime.cpp
new file mode 100644
index 0000000000000..f54d3cc3aa213
--- /dev/null
+++ b/libc/src/time/gpu/clock_settime.cpp
@@ -0,0 +1,7 @@
+//===-- Implementation of clock_settime for gpu ----------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//



More information about the libc-commits mailing list