Code Auto-Generation Many functions in both kernel modules look very similar, and vary mostly by name/id of the system call they handle, and the parameters this system call receives. Instead of writing a lot of similar functions using copy/paste, a perl script generates the code for these functions. It does that by a combination of template files with macros, data types mappings and hard-coded constructs. This approach to code generation is not new, and could be spun into its own project - of writing a general automatic code generator.