smp.h 504 B

1234567891011121314151617181920212223242526272829303132
  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. extern int hard_smp_processor_id(void);
  11. #define NO_PROC_ID -1
  12. extern int ncpus;
  13. static inline void smp_cpus_done(unsigned int maxcpus)
  14. {
  15. }
  16. extern struct task_struct *idle_threads[NR_CPUS];
  17. #else
  18. #define hard_smp_processor_id() 0
  19. #endif
  20. #endif