smp.h 465 B

12345678910111213141516171819202122232425262728
  1. #ifndef __SMP_IPI_H__
  2. #define __SMP_IPI_H__
  3. #include <rtthread.h>
  4. typedef void (*smp_func)(void *data);
  5. #define SMP_CALL_EVENT_FUNC 0x1
  6. struct smp_event
  7. {
  8. int cpu_mask;
  9. int event_id;
  10. void *data;
  11. smp_func func;
  12. };
  13. struct smp_call
  14. {
  15. struct rt_spinlock lock;
  16. struct smp_event event;
  17. };
  18. void rt_smp_call_func_cond(int cpu_mask,smp_func func, void *data);
  19. void rt_smp_call_ipi_handler(int vector, void *param);
  20. void smp_init(void);
  21. #endif