POSIX Threads for Windows – REFERENCE - Pthreads-w32

Reference Index

Table of Contents

Name

pthread_num_processors_np – get the number of processors (CPUs) in use by the process

Synopsis

#include <pthread.h>

int pthread_num_processors_np(void);

Description

pthread_num_processors_np returns the number of processors in the system. This implementation actually returns the number of processors available to the process, which can be a lower number than the system's number, depending on the process's affinity mask.

Cancellation

None.

Return Value

pthread_num_processors_np returns the number of processors currently available to the process.

Errors

None.

Author

Ross Johnson for use with Pthreads-w32.


Table of Contents