SchedGetCpuNum()

Get the index of the CPU that a thread is currently running on

Synopsis:

#include <sys/neutrino.h>

unsigned int SchedGetCpuNum( void );

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The SchedGetCpuNum() kernel call gets the index of the CPU that the calling thread is currently running on.

Note: This index is instantaneously correct, but the thread could be preempted and rescheduled to run on a different CPU at any time.

Returns:

The CPU index.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes