Add macro IS_BSP() to check whether the current CPU is BSP.
MFC after: 1 week
This commit is contained in:
parent
37c2842272
commit
5ba2a4998c
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user