1 /* Public domain. */ 2 3 #ifndef _LINUX_STOP_MACHINE_H 4 #define _LINUX_STOP_MACHINE_H 5 6 #include <machine/intr.h> 7 8 typedef int (*cpu_stop_fn_t)(void *arg); 9 10 static inline int stop_machine(cpu_stop_fn_t fn,void * arg,void * cpus)11stop_machine(cpu_stop_fn_t fn, void *arg, void *cpus) 12 { 13 int r; 14 u_long s = intr_disable(); 15 r = (*fn)(arg); 16 intr_restore(s); 17 return r; 18 } 19 20 #endif 21