Changeset View
Changeset View
Standalone View
Standalone View
sys/tools/makesyscalls.lua
Show First 20 Lines • Show All 721 Lines • ▼ Show 20 Lines | else | ||||
"struct %s {\n\tregister_t dummy;\n};\n", argalias)) | "struct %s {\n\tregister_t dummy;\n};\n", argalias)) | ||||
end | end | ||||
end | end | ||||
local protoflags = get_mask({"NOPROTO", "NODEF"}) | local protoflags = get_mask({"NOPROTO", "NODEF"}) | ||||
if flags & protoflags == 0 then | if flags & protoflags == 0 then | ||||
if funcname == "nosys" or funcname == "lkmnosys" or | if funcname == "nosys" or funcname == "lkmnosys" or | ||||
funcname == "sysarch" or funcname:find("^freebsd") or | funcname == "sysarch" or funcname:find("^freebsd") or | ||||
funcname:find("^linux") or | funcname:find("^linux") then | ||||
funcname:find("^cloudabi") then | |||||
write_line("sysdcl", string.format( | write_line("sysdcl", string.format( | ||||
"%s\t%s(struct thread *, struct %s *)", | "%s\t%s(struct thread *, struct %s *)", | ||||
rettype, funcname, argalias)) | rettype, funcname, argalias)) | ||||
else | else | ||||
write_line("sysdcl", string.format( | write_line("sysdcl", string.format( | ||||
"%s\tsys_%s(struct thread *, struct %s *)", | "%s\tsys_%s(struct thread *, struct %s *)", | ||||
rettype, funcname, argalias)) | rettype, funcname, argalias)) | ||||
end | end | ||||
Show All 10 Lines | if flags & known_flags["NOSTD"] ~= 0 then | ||||
write_line("sysent", string.format( | write_line("sysent", string.format( | ||||
"lkmressys, .sy_auevent = AUE_NULL, " .. | "lkmressys, .sy_auevent = AUE_NULL, " .. | ||||
".sy_flags = %s, .sy_thrcnt = SY_THR_ABSENT },", | ".sy_flags = %s, .sy_thrcnt = SY_THR_ABSENT },", | ||||
sysflags)) | sysflags)) | ||||
column = column + #"lkmressys" + #"AUE_NULL" + 3 | column = column + #"lkmressys" + #"AUE_NULL" + 3 | ||||
else | else | ||||
if funcname == "nosys" or funcname == "lkmnosys" or | if funcname == "nosys" or funcname == "lkmnosys" or | ||||
funcname == "sysarch" or funcname:find("^freebsd") or | funcname == "sysarch" or funcname:find("^freebsd") or | ||||
funcname:find("^linux") or | funcname:find("^linux") then | ||||
funcname:find("^cloudabi") then | |||||
write_line("sysent", string.format( | write_line("sysent", string.format( | ||||
"%s, .sy_auevent = %s, .sy_flags = %s, .sy_thrcnt = %s },", | "%s, .sy_auevent = %s, .sy_flags = %s, .sy_thrcnt = %s },", | ||||
funcname, auditev, sysflags, thr_flag)) | funcname, auditev, sysflags, thr_flag)) | ||||
column = column + #funcname + #auditev + #sysflags + 3 | column = column + #funcname + #auditev + #sysflags + 3 | ||||
else | else | ||||
write_line("sysent", string.format( | write_line("sysent", string.format( | ||||
"sys_%s, .sy_auevent = %s, .sy_flags = %s, .sy_thrcnt = %s },", | "sys_%s, .sy_auevent = %s, .sy_flags = %s, .sy_thrcnt = %s },", | ||||
funcname, auditev, sysflags, thr_flag)) | funcname, auditev, sysflags, thr_flag)) | ||||
▲ Show 20 Lines • Show All 634 Lines • Show Last 20 Lines |