add function.h file

Header file for cpu_count and mthread