Add get_cpu() and put_cpu().

MFC after:	1 week
This commit is contained in:
Mark Johnston 2017-05-21 00:06:36 +00:00
parent 6ab9e0df87
commit d6c8335623

View file

@ -37,4 +37,12 @@ int linux_wbinvd_on_all_cpus(void);
#endif
#define get_cpu() ({ \
sched_pin(); \
PCPU_GET(cpuid); \
})
#define put_cpu() \
sched_unpin()
#endif /* _ASM_SMP_H_ */