[build] Make syscalls.h group by syscall scope

Updating the cog script to make syscalls.h more explicitly grouped by
scope.
This commit is contained in:
Justin C. Miller
2021-12-23 17:01:06 -08:00
parent 762e755b13
commit fd93023440

View File

@@ -14,12 +14,17 @@ ctx = Context(definitions_path)
ctx.parse("syscalls.def") ctx.parse("syscalls.def")
syscalls = ctx.interfaces["syscalls"] syscalls = ctx.interfaces["syscalls"]
last_scope = None
for id, scope, method in syscalls.methods: for id, scope, method in syscalls.methods:
if scope: if scope:
name = f"{scope.name}_{method.name}" name = f"{scope.name}_{method.name}"
else: else:
name = method.name name = method.name
if scope != last_scope:
cog.outl("")
last_scope = scope
args = [] args = []
if method.constructor: if method.constructor:
args.append("j6_handle_t *handle") args.append("j6_handle_t *handle")