next up previous contents index
Next: 11.3.3 smp_find_cpu: Return the Up: 11.3 API reference Previous: 11.3.1 smp_init: Initializes the

11.3.2 smp_find_cur_cpu: Return the processor ID of the current processor.

 

SYNOPSIS

#include <oskit/smp.h>

int smp_find_cur_cpu(void);

DESCRIPTION

This function returns a unique (per-processor) integer representing the current processor. Note that the numbers are not guaranteed to be sequential or starting from 0, although that may be a common case.

On the x86, these numbers correspond to the processor's APIC ID, which is set by the hardware. However, these are to be treated as logical processor numbers since the smp library may do a transformation in the future.

RETURNS

The processor's ID.



University of Utah Flux Research Group