Move CPU related functions to cpus.h