next up previous contents index
Next: 11.3.4 smp_start_cpu: Starts a Up: 11.3 API reference Previous: 11.3.2 smp_find_cur_cpu: Return the

11.3.3 smp_find_cpu: Return the next processor ID

 

SYNOPSIS

#include <oskit/smp.h>

int smp_find_cpu(int first);

DESCRIPTION

Given a number first, it returns the first processor ID such that the ID is greater than or equal to that number.

In order to be assured of finding all the CPUs, the initial call should be made with an argument of 0 and subsequent calls should be made with one more than the previously returned value.

This is designed to be used as an iterator function for the client OS to determine which processor numbers are present.

PARAMETERS

first
The processor number at which to start searching.

RETURNS

Returns E_SMP_NO_PROC if there are no more processors, otherwise the ID of the next processor.



University of Utah Flux Research Group