Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2012 10:56:40 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r230499 - stable/9/sys/amd64/include
Message-ID:  <201201241056.q0OAueHm072050@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Jan 24 10:56:40 2012
New Revision: 230499
URL: http://svn.freebsd.org/changeset/base/230499

Log:
  MFC r230260:
  Add macro IS_BSP() to check whether the current CPU is BSP.

Modified:
  stable/9/sys/amd64/include/pcpu.h
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/include/pcpu.h
==============================================================================
--- stable/9/sys/amd64/include/pcpu.h	Tue Jan 24 10:32:02 2012	(r230498)
+++ stable/9/sys/amd64/include/pcpu.h	Tue Jan 24 10:56:40 2012	(r230499)
@@ -226,6 +226,8 @@ __curthread(void)
 }
 #define	curthread		(__curthread())
 
+#define	IS_BSP()	(PCPU_GET(cpuid) == 0)
+
 #else /* !lint || defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) */
 
 #error "this file needs to be ported to your compiler"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201241056.q0OAueHm072050>