How to determine the number of avaible cpus on an SMP system?
I’ve something about syspage.h in the docs but nothig clarely
documented.
Thanks
–
Wave++
How to determine the number of avaible cpus on an SMP system?
I’ve something about syspage.h in the docs but nothig clarely
documented.
Thanks
–
Wave++
Wave++ <wavexx@apexmail.com> wrote:
How to determine the number of avaible cpus on an SMP system?
I’ve something about syspage.h in the docs but nothig clarely
documented.
That is how you do it. There is a numcpu entry in the syspage.
#include <sys/syspage.h>
num_cpus = _syspage_ptr->num_cpu;
cdm@qnx.com > “The faster I go, the behinder I get.”
Chris McKillop – Lewis Carroll –
Software Engineer, QSSL
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Chris McKillop <cdm@qnx.com> wrote:
Wave++ <> wavexx@apexmail.com> > wrote:
How to determine the number of avaible cpus on an SMP system?
I’ve something about syspage.h in the docs but nothig clarely
documented.
That is how you do it. > > There is a numcpu entry in the syspage.#include <sys/syspage.h
num_cpus = _syspage_ptr->num_cpu;
Would be safer to use SYSPAGE_ENTRY(num_cpu)?
chris
cdm@qnx.com > “The faster I go, the behinder I get.”
Chris McKillop – Lewis Carroll –
Software Engineer, QSSL
–
Wave++