aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/genoffset.sh
Commit message (Collapse)AuthorAgeFilesLines
* genoffset.sh: fix build break on MacOSJonathan T. Looney2023-11-161-1/+1
| | | | | | | | | | Switch from using the shell's builtin echo command to using the builtin printf command to print the asserts. Reported by: jrtc27 Suggested by: imp Fixes: accfb4cc9346 Sponsored by: Netflix
* genoffset.sh: stop using a temporary fileJonathan T. Looney2023-11-161-8/+7
| | | | | | | | | | | Instead, use a here document for the input. This allows us to run the while loop in the main script so we can build the list of asserts in a shell variable. We then print out the list of asserts at the end of the loop. Reviewed by: imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42407
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* genoffset.sh: Use 10 X's instead of 5 for pick mkdtemp implementationsWarner Losh2021-09-071-1/+1
| | | | | | | | | Linux fails to build now because the mkdtemp in the bootstrapped environment wants 6 or more X's. Use 10 out of an abundance of caution. Sponsored by: Netflix Reviewed by: arichards Differential Revision: https://reviews.freebsd.org/D31863
* genoffset: simplify and rewrite in shWarner Losh2021-07-281-79/+38
| | | | | | | | | | | | | | | 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
* expose thread_lite definition to tied modulesMatt Macy2018-07-031-1/+1
| | | | Notes: svn path=/head/; revision=335880
* make critical_{enter, exit} inlineMatt Macy2018-07-031-0/+141
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 Notes: svn path=/head/; revision=335879