Date: Sun, 21 May 2017 00:06:37 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318590 - head/sys/compat/linuxkpi/common/include/asm Message-ID: <201705210006.v4L06bGq092894@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705210006.v4L06bGq092894>