From nobody Thu Nov 11 08:06:34 2021 X-Original-To: dev-commits-src-main@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 9E41D183DEEF; Thu, 11 Nov 2021 08:06:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4HqZ762t4Dz3CFr; Thu, 11 Nov 2021 08:06:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1AB86Y7v096170 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 11 Nov 2021 10:06:37 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1AB86Y7v096170 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1AB86YlE096169; Thu, 11 Nov 2021 10:06:34 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 11 Nov 2021 10:06:34 +0200 From: Konstantin Belousov To: Antoine Brodin Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 160b4b922b60 - main - Add real sched.h Message-ID: References: <202111101934.1AAJYJFQ041545@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4HqZ762t4Dz3CFr X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Nov 11, 2021 at 07:29:19AM +0000, Antoine Brodin wrote: > On Wed, Nov 10, 2021 at 7:34 PM Konstantin Belousov wrote: > > > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=160b4b922b6021848b6b48afc894d16b879b7af2 > > > > commit 160b4b922b6021848b6b48afc894d16b879b7af2 > > Author: Konstantin Belousov > > AuthorDate: 2021-10-22 15:17:21 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2021-11-10 19:18:53 +0000 > > > > Add real sched.h > > > > It is required by IEEE Std 1003.1-2008 AKA POSIX. > > > > Put some Linux compatibility stuff under BSD_VISIBLE namespace, in > > particular, sys/cpuset.h definitions. Also, if user really want > > Linux compatibility, she can request cpu_set_t typedef with > > _WITH_CPU_SET_T define. > > > > Reviewed by: jhb > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > Differential revision: https://reviews.freebsd.org/D32901 > > --- > > include/Makefile | 5 +++-- > > include/sched.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 49 insertions(+), 2 deletions(-) > > Hi, > > It seems that this broke some ports: > http://gohan03.nyi.freebsd.org/data/main-amd64-default-baseline/p913ccecf2a92_s448bcd01dc/logs/errors/ninja-1.10.2,2.log > http://gohan03.nyi.freebsd.org/data/main-amd64-default-baseline/p913ccecf2a92_s448bcd01dc/logs/errors/ghc-8.10.7.log > http://gohan03.nyi.freebsd.org/data/main-amd64-default-baseline/p913ccecf2a92_s448bcd01dc/logs/errors/openpgm-5.2.122_6.log > http://gohan03.nyi.freebsd.org/data/main-amd64-default-baseline/p913ccecf2a92_s448bcd01dc/logs/errors/guile2-2.2.7_1.log > http://gohan03.nyi.freebsd.org/data/main-amd64-default-baseline/p913ccecf2a92_s448bcd01dc/logs/errors/liburcu-0.12.1.log > http://gohan03.nyi.freebsd.org/data/main-amd64-default-baseline/p913ccecf2a92_s448bcd01dc/logs/errors/guile-3.0.7.log > http://gohan03.nyi.freebsd.org/data/main-amd64-default-baseline/p913ccecf2a92_s448bcd01dc/logs/errors/squid-4.15.log > ... Could you please try this? My intent was that cpu_set_t would be requested as needed by consumers with _WITH_CPU_SET_T. commit b6bb08f09dc7cf2796c35015f5aee93dedf33018 Author: Konstantin Belousov Date: Thu Nov 11 10:01:54 2021 +0200 sched.h: Make cpu_set_t compat typedef visible unconditionally or rather, visible if BSD namespace is enabled, instead of requiring _WITH_CPU_SET_T define to expose it. It seems a lot of code assumes that presence of sched_getaffinity() implies existence of cpu_set_t. Reported by: portmgr (antoine) Sponsored by: The FreeBSD Foundation MFC after: 1 week diff --git a/include/sched.h b/include/sched.h index 1c41cda79046..2d4f301c9718 100644 --- a/include/sched.h +++ b/include/sched.h @@ -34,13 +34,8 @@ #include #if __BSD_VISIBLE #include -#endif /* __BSD_VISIBLE */ - -#if __BSD_VISIBLE -#ifdef _WITH_CPU_SET_T struct _cpuset; typedef struct _cpuset cpu_set_t; -#endif /* _WITH_CPU_SET_T */ #endif /* __BSD_VISIBLE */ __BEGIN_DECLS