smp.h 567 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef __UM_SMP_H
  2. #define __UM_SMP_H
  3. #ifdef CONFIG_SMP
  4. #include "linux/bitops.h"
  5. #include "asm/current.h"
  6. #include "linux/cpumask.h"
  7. #define raw_smp_processor_id() (current_thread->cpu)
  8. #define cpu_logical_map(n) (n)
  9. #define cpu_number_map(n) (n)
  10. #define PROC_CHANGE_PENALTY 15 /* Pick a number, any number */
  11. extern int hard_smp_processor_id(void);
  12. #define NO_PROC_ID -1
  13. extern int ncpus;
  14. static inline void smp_cpus_done(unsigned int maxcpus)
  15. {
  16. }
  17. extern struct task_struct *idle_threads[NR_CPUS];
  18. #else
  19. #define hard_smp_processor_id() 0
  20. #endif
  21. #endif