mycpu Kernel Service

Purpose

Gets the bind ID of the processor we are running on.

Syntax

#include <sys/processor.h>

cpu_t myc ()

Description

The mycpu kernel service returns the bind ID of the processor we are currently running on.

Execution Environment

The mycpu kernel services can be called from either the process or interrupt environment. This routine must be called disabled. Otherwise, the calling thread might be preempted and resume execution on a different processor resulting in a stale value being returned.

Return Values

The mycpu kernel service returns the bind ID of the current processor.