cpumap.h 305 B

1234567891011121314151617
  1. #ifndef _CPUMAP_H
  2. #define _CPUMAP_H
  3. #ifdef CONFIG_SMP
  4. void cpu_map_rebuild(void);
  5. int map_to_cpu(unsigned int index);
  6. #define cpu_map_init() cpu_map_rebuild()
  7. #else
  8. #define cpu_map_init() do {} while (0)
  9. static inline int map_to_cpu(unsigned int index)
  10. {
  11. return raw_smp_processor_id();
  12. }
  13. #endif
  14. #endif