tor  0.4.2.1-alpha-dev
Functions
numcpus.h File Reference

Go to the source code of this file.

Functions

int compute_num_cpus (void)
 

Detailed Description

Header for numcpus.c.

Definition in file numcpus.h.

Function Documentation

◆ compute_num_cpus()

int compute_num_cpus ( void  )

Return how many CPUs we are running with. We assume that nobody is using hot-swappable CPUs, so we don't recompute this after the first time. Return -1 if we don't know how to tell the number of CPUs on this system.

Definition at line 81 of file numcpus.c.

References compute_num_cpus_impl(), and tor_assert().

Referenced by get_num_cpus().