Kernel tree file naming convention

Lots of files in the kernel source tree are named like kern_xxx.c - fair enough. But what does the "subr_xxx.c" prefix mean? My best guess is that subr = subroutine, but that seems rather vague in this context.

Also curious about the sys_xxx.c files, since it would seem those should contain syscall implementations, but then that conflicts with some syscall implementations being in kern_xxx.c files (e.g kern_fork.c)
 
Just a wild guess, but for some cases, codes with different aspects needed to be in single source file. For example, sharing static variables.

Maybe source files for specific perspective only to name such as subr_*, sys_*, vm_* and so on, and files containing multiple perspective to be named as kern_* would make things a bit simpler, if currently not. Because /usr/src/sys directory itself is for kernel sources.
 
Back
Top