HomeFreeBSD

sys: Extract __bitcount* from sys/types.h to new sys/bitcount.h

Description

sys: Extract __bitcount* from sys/types.h to new sys/bitcount.h

This will allow the code to be reused by the cross-build sys/types.h
wrapper in order to provide the APIs for greater compatibility. This
also provides a path towards eventually removing the definitions from
sys/types.h altogether if so desired by gradually migrating users to
including sys/bitcount.h explicitly, but that is not the primary goal
here.

Note that the copyright header is a direct copu of sys/types.h's given
that's where this code comes from. This could be replaced in future with
a more specific one restricted to just the code in question, depending
on what the copyright for that code is.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D36132

Details

Provenance
jrtc27Authored on Aug 18 2022, 1:46 AM
Reviewer
emaste
Differential Revision
D36132: sys: Extract __bitcount* from sys/types.h to new sys/bitcount.h
Parents
rGb0ce7dfc5e28: makefs: Fix 32-bit issues in ZFS time attributes setting
Branches
Unknown
Tags
Unknown