From nobody Mon Jul 28 13:31:10 2025 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 4brKB83QfPz634n5; Mon, 28 Jul 2025 13:31:12 +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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4brKB70TjFz3tDx; Mon, 28 Jul 2025 13:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753709471; 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=MiLz85OTmOwdDybECKhTFf4LBiDzMbq2wA1qPTgjZ8s=; b=ou3YGMcONJEo8tSll2RdrpcCW5rZ8wuvtHc1dAJWJRu8TpvjjtXd59bKdkis+xpODn9ELJ CEf36me/eSmlPpurVUZAjPxvH74KLV+WVBOJ07Wr+VZCyJOlk9aZ+sOG9EO5x708Cj7qYW pN657uUSXtxyD8nVerY4yVxirZ698zJ27ULHxETjaYiWGQ2lqnxXzex4g6izA/mMahSCA5 NMQ4qNzdlPzACwv2yTwLiTwK5Zq26+utA2i8CQzLmY31Nhkpc/4tj078ta6q2qMJ5AxQhf V64eWvWx2Iw8UZK/rnD8MoBelhgV58exGrQzne0X4htJMy2NI8Z1MvMCM8pMIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753709471; 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=MiLz85OTmOwdDybECKhTFf4LBiDzMbq2wA1qPTgjZ8s=; b=IvocnxePQfoQRSFVmIuSCUIi9E6b5d+QX9iznMQx2sMUApeXnbXRqtktu6jOPfHZEb0Qup G1rd8Bnnzfr3Uj2lOK0hFRT7iCTh56iVqUX+pIutYBijb7BhYtX2HfWVwHH6952TzCgzcd IltVLB46xTrdLn05OlL/0RIdsOS5SL5ha3iXgIhyePpkGYpee5G5N7FJXNXnAtXmaJI6Nk qG5cpNT2vVL+HdqrVoFfcPi2best+CYvVrljkGG7W5LxHLs7dLWh4lz1uCzd2kxlwOIipB GrWkVZqCLH+3RbBEb9agHRwfAtkYpRSevQdddP9hOxDOMV26kHH6nb+FCM7C7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753709471; a=rsa-sha256; cv=none; b=ZgdHiyh2hCbKdZ31WGskTUSU4avDoN33WzPO+I01eQAB331TIV8sCpT82ErhOWplzxfU+7 KTdPaQZGdCJr46FUl0E5ImdjUJ5UC//oi6uEIgQwQ3Hj7uLNyP0yuk89HlZXuLZ+DmiNiS I7RXtCp1r7ppbIbcnTVNsnbQXmPBqMBS6KhpLETUdvR+iDs5ucgLVh/4ijRqIWk98d3QSC +EKDAduOvBQLoHAYawjnzhh2YD1/Wmq8lpJZDtZqQrndoKTd9G8MauBNpRENp5IYxl0enm w+hekO61ot/0MWZF/pGugOgCfjf5MbP5ug7l/c8xEfMPNz/4E1jjDmY3K9sTkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4brKB63JMBznfF; Mon, 28 Jul 2025 13:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56SDVAdq079958; Mon, 28 Jul 2025 13:31:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56SDVAaB079955; Mon, 28 Jul 2025 13:31:10 GMT (envelope-from git) Date: Mon, 28 Jul 2025 13:31:10 GMT Message-Id: <202507281331.56SDVAaB079955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 3020792db818 - stable/14 - runq: Hide function prototypes under _KERNEL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3020792db81819455f3b9ad6ca29f420c54e6971 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=3020792db81819455f3b9ad6ca29f420c54e6971 commit 3020792db81819455f3b9ad6ca29f420c54e6971 Author: Olivier Certner AuthorDate: 2024-03-28 13:32:17 +0000 Commit: Olivier Certner CommitDate: 2025-07-28 13:28:01 +0000 runq: Hide function prototypes under _KERNEL And some structure definitions as well. This header really is not supposed to be included by userland, so should just error in this case. However, there is one remaining use for it in a test: Getting the value of RQ_PPQ to ensure a big enough priority level difference in order to guarantee that a realtime thread preempts another. This use will soon be obsoleted by guaranteeing that a realtime thread always preempts another one with lower priority, even if the priority level is very close. Reviewed by: kib MFC after: 1 month Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45387 (cherry picked from commit 28b54827f5c10212de752a8e2c4eaf07170d242c) --- sys/sys/runq.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/sys/runq.h b/sys/sys/runq.h index d40fee25846e..b9cfa847617b 100644 --- a/sys/sys/runq.h +++ b/sys/sys/runq.h @@ -30,7 +30,6 @@ #define _RUNQ_H_ #include -#include #ifdef _KERNEL #include @@ -38,8 +37,6 @@ #include #endif -struct thread; - /* * Run queue parameters. */ @@ -59,6 +56,12 @@ typedef unsigned long rqb_word_t; /* runq's status words type. */ #define RQB_BIT(idx) (1ul << ((idx) % RQB_BPW)) #define RQB_FFS(word) (ffsl((long)(word)) - 1) /* Assumes two-complement. */ + +#ifdef _KERNEL +#include + +struct thread; + /* * Head of run queues. */ @@ -90,5 +93,6 @@ struct thread *runq_choose_fuzz(struct runq *, int); void runq_init(struct runq *); void runq_remove(struct runq *, struct thread *); void runq_remove_idx(struct runq *, struct thread *, u_char *); +#endif /* _KERNEL */ #endif