From nobody Fri Jan 14 18:10:22 2022 X-Original-To: dev-commits-src-branches@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 6D8F61942784; Fri, 14 Jan 2022 18:10:23 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jb8V653zYz4pDF; Fri, 14 Jan 2022 18:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642183822; 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=M6y32uSiAXjRSquRe2cHZ0FSGYqjlkzdTvZK9AubT3M=; b=X3xrtVerpQtDuIxzMDpv78BkFbzo+q+QMtHReYaG3tyurNDMi9EcL4UGed115CoO/EHIT8 rUEM0dKgHoKF82L+P/XfkEzB2ZjBe7gbZ6wcvFPYj+mfzl3nTu/rohNnAgcuuoHSsaYMXE LsRcaTXtcdyr3ZEn5+H/9qxZGjZ3jSahyE7Q6u99GKVA+5e6L8EL5YbBzrS9yU3AqXEyDu aZtMGs9xGXSdv0aE00A04nhNw8G1aHJIk1Vl+R2os1ZOeb5dnywCxcN2wAmC8bEi3NBHCO V5Y1NL0xkB3fYRDRS6Uyhze/bzUNDP2VLU2wMi0mz9ygra1GMASsih0AZSliTQ== 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 840AA1860F; Fri, 14 Jan 2022 18:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20EIAMGq095383; Fri, 14 Jan 2022 18:10:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20EIAMA2095382; Fri, 14 Jan 2022 18:10:22 GMT (envelope-from git) Date: Fri, 14 Jan 2022 18:10:22 GMT Message-Id: <202201141810.20EIAMA2095382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 58865d5f8d68 - stable/13 - sched.h: Hide all Linux compat sched_* functions under _WITH_CPU_SET_T List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/13 X-Git-Reftype: branch X-Git-Commit: 58865d5f8d689e6bae843b47831999a2dd78081d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642183822; 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=M6y32uSiAXjRSquRe2cHZ0FSGYqjlkzdTvZK9AubT3M=; b=sxxkVr/FUaEQ7JwzOGIVGC+2Uer+Pqn8KOWWrVd1S7u11Sc0kklydtS8BVGpJObT3/8FDa Qkkk1VRPRNZYTzrzqDF9p3dFSQgIqtEf2zvOuRn+bzceqK245lJTTkuGoJx8qyyf5Psryu lEAgQuEruwLrgsmPF1tUZG0KYFNIh5kU0SeRkXggg5YWy3603zCcAd9+WZ7ChzW4ecDW2E J7YeBT7uwVVD7wQHo7NCI4rfc99s6YslcxLhudT0bj7BrIdC7DDBW65MbngZu7vGHptGlw qymLgL8yrAC74/yuG6FbOO4oDo76cGfOXv6s3QU/Ni1pfmsLnEj6dBlX0Yd02g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642183822; a=rsa-sha256; cv=none; b=IwtzQCZJljvlAs0puL+R9UCMhr9J7WuTnk6JEtXRqydBvvMgJdmK5iLE3YpWOoQe9bowuZ PQ1QEp/3X72d1ZZSEvRDWsDad/zXuMhlXoS2GEhydJy45bnA+AqTxuwPb66jfFeh0jAHry OVcXqEObPUkmkImHSbncsCzykwWA34hsoXOHdHfJnXZ8wgigkXXoBH5ehH7AXh83gGrKKK zzZ6AE5XnQtonLQBUCBtOjyL7/eKDLFwoYEhFfqss1EW0YnGyo9L5it48ZVJoL/xw4C79U LWSpIqg7WDV1EmcgCSIxKH3DSapCHBcbpdAymNjD3fzr+EFYrqmSgjZ8gk0jSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=58865d5f8d689e6bae843b47831999a2dd78081d commit 58865d5f8d689e6bae843b47831999a2dd78081d Author: Konstantin Belousov AuthorDate: 2021-11-11 08:01:54 +0000 Commit: Konstantin Belousov CommitDate: 2022-01-14 16:17:29 +0000 sched.h: Hide all Linux compat sched_* functions under _WITH_CPU_SET_T (cherry picked from commit 90fa9705d5cd29cf11c5dc7319299788dec2546a) --- include/sched.h | 7 +++---- lib/libc/gen/sched_getaffinity.c | 1 + lib/libc/gen/sched_getcpu_gen.c | 1 + lib/libc/gen/sched_setaffinity.c | 1 + lib/libc/x86/sys/sched_getcpu_x86.c | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/sched.h b/include/sched.h index 1c41cda79046..460d3bfed154 100644 --- a/include/sched.h +++ b/include/sched.h @@ -32,12 +32,9 @@ #include #include #include -#if __BSD_VISIBLE -#include -#endif /* __BSD_VISIBLE */ - #if __BSD_VISIBLE #ifdef _WITH_CPU_SET_T +#include struct _cpuset; typedef struct _cpuset cpu_set_t; #endif /* _WITH_CPU_SET_T */ @@ -45,9 +42,11 @@ typedef struct _cpuset cpu_set_t; __BEGIN_DECLS #if __BSD_VISIBLE +#ifdef _WITH_CPU_SET_T int sched_getaffinity(pid_t pid, size_t cpusetsz, cpuset_t *cpuset); int sched_setaffinity(int pid, size_t cpusetsz, const cpuset_t *cpuset); int sched_getcpu(void); +#endif /* _WITH_CPU_SET_T */ #endif /* __BSD_VISIBLE */ __END_DECLS diff --git a/lib/libc/gen/sched_getaffinity.c b/lib/libc/gen/sched_getaffinity.c index 191374a3c5e3..5557d3d93b47 100644 --- a/lib/libc/gen/sched_getaffinity.c +++ b/lib/libc/gen/sched_getaffinity.c @@ -26,6 +26,7 @@ * SUCH DAMAGE. */ +#define _WITH_CPU_SET_T #include int diff --git a/lib/libc/gen/sched_getcpu_gen.c b/lib/libc/gen/sched_getcpu_gen.c index ef1bebc2915a..704075c0ae53 100644 --- a/lib/libc/gen/sched_getcpu_gen.c +++ b/lib/libc/gen/sched_getcpu_gen.c @@ -26,6 +26,7 @@ * SUCH DAMAGE. */ +#define _WITH_CPU_SET_T #include #include "libc_private.h" diff --git a/lib/libc/gen/sched_setaffinity.c b/lib/libc/gen/sched_setaffinity.c index 9368b1752b74..ad775b5dbce5 100644 --- a/lib/libc/gen/sched_setaffinity.c +++ b/lib/libc/gen/sched_setaffinity.c @@ -26,6 +26,7 @@ * SUCH DAMAGE. */ +#define _WITH_CPU_SET_T #include int diff --git a/lib/libc/x86/sys/sched_getcpu_x86.c b/lib/libc/x86/sys/sched_getcpu_x86.c index 13ba18ef5e36..5e3bd5311734 100644 --- a/lib/libc/x86/sys/sched_getcpu_x86.c +++ b/lib/libc/x86/sys/sched_getcpu_x86.c @@ -32,6 +32,7 @@ #include #include #include +#define _WITH_CPU_SET_T #include #include "libc_private.h"