#### POSIX Threads for Windows – REFERENCE - pthreads-win32

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-win32.

Table of Contents

- Name

- Synopsis

- Description

- Cancellation

- Return Value

- Errors

- Author