svn commit: r357614 - in head/sys: kern sys

Paweł Biernacki pawel.biernacki at gmail.com
Thu Feb 6 18:31:27 UTC 2020


Thanks, will be fixed before enabling it.


> On 6 Feb 2020, at 17:41, Hans Petter Selasky <hps at selasky.org> wrote:
> 
> 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
> 
> Like cem@ pointed out, either you expand the XOR via OR or you can also do it like this:
> 
> (((x) & CTLFLAG_MPSAFE) != 0) ^ (((x) & CTLFLAG_NEEDGIANT) != 0)
> 
> which avoids having to define another macro.
> 
> --HPS



More information about the svn-src-head mailing list