cmdprio: move cmdprio function definitions to a new cmdprio.c file