svn commit: r318590 - head/sys/compat/linuxkpi/common/include/asm
Mark Johnston
markj at FreeBSD.org
Sun May 21 00:06:38 UTC 2017
Author: markj
Date: Sun May 21 00:06:36 2017
New Revision: 318590
URL: https://svnweb.freebsd.org/changeset/base/318590
Log:
Add get_cpu() and put_cpu().
MFC after: 1 week
Modified:
head/sys/compat/linuxkpi/common/include/asm/smp.h
Modified: head/sys/compat/linuxkpi/common/include/asm/smp.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/asm/smp.h Sat May 20 23:25:07 2017 (r318589)
+++ head/sys/compat/linuxkpi/common/include/asm/smp.h Sun May 21 00:06:36 2017 (r318590)
@@ -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_ */
More information about the svn-src-head
mailing list