diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2021-11-22 22:36:58 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2021-11-22 22:36:58 +0000 |
| commit | 64cc9803ab6fe661cf56c708e26b23d87f4b4ce6 (patch) | |
| tree | 0d78807776c3c38af2ca5fc84b9ee6a3be4e9f52 /sys/tools/makesyscalls.lua | |
| parent | 988e8db3c041e39db0da9fbb0edde9e0e3d53326 (diff) | |
Diffstat (limited to 'sys/tools/makesyscalls.lua')
| -rw-r--r-- | sys/tools/makesyscalls.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 48ad05eb0469..386a79e44eeb 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -68,6 +68,10 @@ local config = { abi_semid_t = "semid_t", abi_ptr_array_t = "", ptr_intptr_t_cast = "intptr_t", + syscall_abi_change = "", + sys_abi_change = {}, + syscall_no_abi_change = "", + sys_no_abi_change = {}, obsol = "", obsol_dict = {}, unimpl = "", @@ -391,6 +395,18 @@ local function process_unimpl() end end +local function process_syscall_abi_change() + local changes_abi = config["syscall_abi_change"] + for syscall in changes_abi:gmatch("([^ ]+)") do + config["sys_abi_change"][syscall] = true + end + + local no_changes = config["syscall_no_abi_change"] + for syscall in no_changes:gmatch("([^ ]+)") do + config["sys_no_abi_change"][syscall] = true + end +end + local function abi_changes(name) if known_abi_flags[name] == nil then abort(1, "abi_changes: unknown flag: " .. name) @@ -1197,6 +1213,9 @@ process_syscall_def = function(line) if args ~= nil then funcargs, changes_abi = process_args(args) end + if config["sys_no_abi_change"][funcname] then + changes_abi = false + end local noproto = config["abi_flags"] ~= "" and not changes_abi local argprefix = '' @@ -1204,12 +1223,19 @@ process_syscall_def = function(line) if abi_changes("pointer_args") then for _, v in ipairs(funcargs) do if isptrtype(v["type"]) then + if config["sys_no_abi_change"][funcname] then + print("WARNING: " .. funcname .. + " in syscall_no_abi_change, but pointers args are present") + end changes_abi = true goto ptrfound end end ::ptrfound:: end + if config["sys_abi_change"][funcname] then + changes_abi = true + end if changes_abi then -- argalias should be: -- COMPAT_PREFIX + ABI Prefix + funcname @@ -1311,6 +1337,7 @@ elseif config["capenabled"] ~= "" then end process_compat() process_abi_flags() +process_syscall_abi_change() process_obsol() process_unimpl() |
