libk  syscall.awk at [709ffb094d]

File arch/syscall.awk artifact 23075063af part of check-in 709ffb094d


BEGIN {
	if (out == "h") {
		print "#ifndef KIplatform_syscalls"
		print "#define KIplatform_syscalls"
		print "enum k_platform_syscall {"
	}
}

out == "h" { print "\tk_platform_syscall_"$1" = "$2"," } # c header
out == "s" { print "%define sys."$1" "$2 } # assembly

END {
	if (out == "h") {
		print "};"
		print "#endif"
	}
}