]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
genoffset: simplify and rewrite in sh
authorWarner Losh <imp@FreeBSD.org>
Wed, 28 Jul 2021 19:47:05 +0000 (13:47 -0600)
committerWarner Losh <imp@FreeBSD.org>
Sun, 12 Sep 2021 16:33:13 +0000 (10:33 -0600)
commit1f4475725f0e6a65b6a07f927a278b72a620d8ba
tree172520c3b3f8cdac03c12bcf75ea962bc25321b0
parent5bdfcb07f38a51ba09147da6074b0009f53861c4
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

(cherry picked from commit 824897a3aea5ca22db8cb7d5b404697a1de1210a)
sys/kern/genoffset.sh
sys/sys/assym.h