smp.h 509 B

123456789101112131415161718192021222324252627282930
  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_call
  7. {
  8. struct rt_spinlock lock;
  9. struct rt_list_node node;
  10. struct smp_event *event;
  11. };
  12. struct smp_event
  13. {
  14. int cpu_mask;
  15. int event_id;
  16. void *data;
  17. smp_func func;
  18. };
  19. void test();
  20. void rt_smp_call_func_cond(int cpu_mask,smp_func func, void *data);
  21. void rt_smp_call_ipi_handler(int vector, void *param);
  22. void smp_init(void);
  23. #endif