freebsd-dev/sys/tools
Kyle Evans 0bc1c0786b makesyscalls.lua: improve syscall ordering validation
There were two separate issues here:

1.) #if/#else wasn't taken into account at all for maxsyscall figures, but
2.) We didn't validate contiguous syscall numbers anyways...

This kind of inconsistency is bad as we don't currently ensure explicit
indexing of, e.g., the sysent array if one syscall is unimplemented/missing.
This could be fixed and might be more robust, but it's also good to have the
"documentation" that comes from being explicit as to what the missing
syscalls are.

The new version looks much like the awk version; stash off the current
'last highest syscall seen' if we hit an #if, restore to that if we hit an
#else, and make sure that we're explicitly always defining the next syscall.

The logic at the tail end of process_syscall_def that moves maxsyscall has
been 'cleaned up' a little since we're now ensuring that it's monotonically
increasing earlier in the function. At the moment I think it's unlikely we'd
see range-definitions that are not UNIMPL, but there's no reason to
specifically handle that case for bumping maxsyscall there.

This change was provoked by reading the commit message for r363832 and
realizing that this validation hadn't been included in the initial rewrite
to lua.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D25945
2020-08-04 21:49:13 +00:00
..
fdt make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH 2018-12-14 23:53:28 +00:00
sound
acpi_quirks2h.awk
bus_macro.sh
embed_mfs.sh embed_mfs.sh: replace some compound statements with conventional ifs 2018-11-02 21:07:06 +00:00
fw_stub.awk fw_stub.awk: use @generated tag in generated files 2019-09-11 13:35:22 +00:00
makeobjops.awk Add a 'SINGLETON' directive to kobj interface definition 2020-01-18 02:39:38 +00:00
makesyscalls.lua makesyscalls.lua: improve syscall ordering validation 2020-08-04 21:49:13 +00:00
miidevs2h.awk
pccarddevs2h.awk
sdiodevs2h.awk Add SDIO support. 2019-06-08 16:26:56 +00:00
usbdevs2h.awk
vnode_if.awk vfs: inline vops if there are no pre/post associated calls 2020-07-30 15:50:51 +00:00