HomeFreeBSD

make critical_{enter, exit} inline

Description

make critical_{enter, exit} inline

Avoid pulling in all of the <sys/proc.h> dependencies by
automatically generating a stripped down thread_lite exporting
only the fields of interest. The field declarations are type checked
against the original and the offsets of the generated result is
automatically checked.

kib has expressed disagreement and would have preferred to simply
use genassym style offsets (which loses type check enforcement).
jhb has expressed dislike of it due to header pollution and a
duplicate structure. He would have preferred to just have defined
thread in _thread.h. Nonetheless, he admits that this is the only
viable solution at the moment.

The impetus for this came from mjg's D15331:
"Inline critical_enter/exit for amd64"

Reviewed by: jeff
Differential Revision: https://reviews.freebsd.org/D16078

Details

Provenance
mmacyAuthored on
Reviewer
jeff
Differential Revision
D16078: make critical_{enter, exit} inline
Parents
rS335878: Doh! Commit the proper default values, not my local tweaks.
Branches
Unknown
Tags
Unknown