HomeFreeBSD

genoffset: simplify and rewrite in sh

Description

genoffset: simplify and rewrite in sh

genoffset used the fully generic ASSYM macro to generate the offsets
needed for the thread_lite structure. However, since these are offsets
into a structure, they will always be necessarily small and positive. As
such, just create a simple character array of the right size and use a
naming convention such that we can recover the field name, structure
name and type. Use nm -t d and sort -n to sort these into order, then
loop over the resutls to generate the thread_lite structure.

MFC After: 2 weeks
Reviewed by: kib, markj (earlier versions)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D31203

Details

Provenance
impAuthored on Jul 28 2021, 7:47 PM
Reviewer
kib
Differential Revision
D31203: genoffset: simplify and rewrite in sh
Parents
rG46dd3ef0338b: genassym.sh: Fix two minor issues found by shellcheck
Branches
Unknown
Tags
Unknown