Add macro IS_BSP() to check whether the current CPU is BSP.

MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2012-01-17 07:21:23 +00:00
parent 37c2842272
commit 5ba2a4998c

View File

@ -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"