Date: Thu, 6 Feb 2020 19:31:22 +0100 From: =?utf-8?Q?Pawe=C5=82_Biernacki?= <pawel.biernacki@gmail.com> To: Hans Petter Selasky <hps@selasky.org> Cc: Pawel Biernacki <kaktus@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357614 - in head/sys: kern sys Message-ID: <98C8A90D-84F5-4E10-B982-DDF95B8912D2@gmail.com> In-Reply-To: <ed14c28a-d212-e488-898a-cf85ac6ead73@selasky.org> References: <202002061245.016CjwTi096374@repo.freebsd.org> <ed14c28a-d212-e488-898a-cf85ac6ead73@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks, will be fixed before enabling it. > On 6 Feb 2020, at 17:41, Hans Petter Selasky <hps@selasky.org> wrote: >=20 > On 2020-02-06 13:45, Pawel Biernacki wrote: >> +#ifdef notyet >> +#define SYSCTL_ENFORCE_FLAGS(x) = \ >> + _Static_assert(((CTLFLAG_MPSAFE ^ CTLFLAG_NEEDGIANT) & (x)), = \ >> + "Has to be either CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT") >> +#else >> +#define SYSCTL_ENFORCE_FLAGS(x) >> +#endif >=20 > Like cem@ pointed out, either you expand the XOR via OR or you can = also do it like this: >=20 > (((x) & CTLFLAG_MPSAFE) !=3D 0) ^ (((x) & CTLFLAG_NEEDGIANT) !=3D 0) >=20 > which avoids having to define another macro. >=20 > --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?98C8A90D-84F5-4E10-B982-DDF95B8912D2>