libk  syscall.awk at [49bf71fb47]

File arch/syscall.awk artifact 23075063af part of check-in 49bf71fb47


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"
	}
}