FIX: need static inline of set_cpu instead extern inline for set_cpu with threads