From nobody Tue Nov 17 01:09:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jT68S28VKz71PpX for ; Tue, 17 Nov 2026 01:09:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jT68R64Jqz3CbH for ; Tue, 17 Nov 2026 01:09:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794877783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHafYQnCXWFoNqt8SoSu/Xd+dBQqoaTTs2X+7C15VZ0=; b=vxT1FE5bMfrndv7o5GTX+qBXyFLuCfWs7TylutgCSrYn67Jo3X4xDXhYcZz3RSmAS5AgI8 JvwYAIJTPlNlucZgSi9Gp9KpjxIcJ1SvVX2i7587VEcUBfA7hbH4gZxIutjc+hAXHX+T6v SPBa8skr0G9yMGKXW5Cub0MzrJTledKiKo5x/MbK11XA1avdIO9pPo/D3cqIMmXKa+KJk0 Lu+NwzNMpTJ8Yb01CnlUr9Oc4e0/rbkcIYLhdd5YEHBl5x5yd053PhDZ3BWrt7ydWwNuIw PVleyRVplmpWd0MHBpijUamudJkutY8LxnmKxdeoJuhXizNf1FwT2AO6FZdWwg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794877783; b=pAm8rcYx3+cfyWIRdy8Pg9aRZO/C8rLd25YbdX7iTJiCGtGAuljLJQItVvT+GpU4oemuUW HHGkARgxKI7nMspNeclVkioz0ndHtXu/h3df/cvy6d2gxQl7CRzC+ErV8Yot/8vhjhZB+N OWS/5qhvRTJvF7MyJiKA/L2oy5goikqlKxdIgBAbHoV4DZ8YlTILOngzG2kLIBRGW9tTLP 7Z6d0CKst+4p3NuFRZf8LxJOkAhJJCOAMEH9cD9P9xjkuh7qjiT4r7d5Tkk7rP/6hCX23E 9W/GQeGDNWFXN0GCFF4soTVRFF4J5NJKthcfNmiTH0w1HWK5drDpyKt1+XFUyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794877783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHafYQnCXWFoNqt8SoSu/Xd+dBQqoaTTs2X+7C15VZ0=; b=TTkHXMGFPrzshBS9wpjPj1p9C/bJreSlurcFE3B+7UyiKCFCqX9LiFh/aInI+YOCdv0h9W IVUKmySy4MO8Y7rEEabtRecM0xkv9AdMokCy6DtpMVJ6NKMGII5Bi7Dp742V6n8nKzlcDd aMxzWpncNvA+uuReHdYUiryMgsrvK8KWDzJJBxA5/rS+7F42xaFpsQT6ZVEnBa3AjXcY0H c5Ors3B7gCgZ3Uf+LsSG9L0J5BCLMMhr5i7WDQHCZLBqGjb7DHi+QDdLM4fjfUtwF1uwNn 11JTMmvmFGGi4OJk6j4sDIwxnaZIMF9fCD5gqGC5/TZxWy1EeTjh7ULTYdJ5EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jT68R5jD0zJC5 for ; Tue, 17 Nov 2026 01:09:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1efe3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 17 Nov 2026 01:09:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ba5b331aef2b - stable/15 - lib/libthr: add helper to check valid clockid to use with _umtx_op(2) List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ba5b331aef2bfc61131de86d21cf040b394ec3ee Auto-Submitted: auto-generated Date: Tue, 17 Nov 2026 01:09:43 +0000 Message-Id: <6afba957.1efe3.6c1fdbe@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ba5b331aef2bfc61131de86d21cf040b394ec3ee commit ba5b331aef2bfc61131de86d21cf040b394ec3ee Author: Konstantin Belousov AuthorDate: 2026-11-05 20:39:40 +0000 Commit: Konstantin Belousov CommitDate: 2026-11-17 00:25:00 +0000 lib/libthr: add helper to check valid clockid to use with _umtx_op(2) (cherry picked from commit 62e53516f73247d2ed80d8dc452f02d9a92575a0) --- lib/libthr/thread/thr_private.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 2edf09d761ae..d06f9b98098c 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -968,6 +968,34 @@ _sleepq_first(struct sleepqueue *sq) return TAILQ_FIRST(&sq->sq_blocked); } +/* + * Must accept the same clocks as umtx_check_clockid() in + * sys/kern/kern_umtx.c. + */ +static inline int +_thr_check_clockid(clockid_t clockid) +{ + switch (clockid) { + case CLOCK_REALTIME: + case CLOCK_REALTIME_PRECISE: + case CLOCK_REALTIME_FAST: + case CLOCK_MONOTONIC: + case CLOCK_MONOTONIC_PRECISE: + case CLOCK_MONOTONIC_FAST: + case CLOCK_UPTIME: + case CLOCK_UPTIME_PRECISE: + case CLOCK_UPTIME_FAST: + case CLOCK_SECOND: + case CLOCK_VIRTUAL: + case CLOCK_PROF: + case CLOCK_PROCESS_CPUTIME_ID: + case CLOCK_TAI: + return (0); + default: + return (EINVAL); + } +} + void _sleepq_init(void) __hidden; struct sleepqueue *_sleepq_alloc(void) __hidden; void _sleepq_free(struct sleepqueue *) __hidden;