Re: getting processor numbers

From: Paul Jackson
Date: Wed Apr 04 2007 - 03:02:26 EST


Jakub wrote:
> OpenMP wants (4) and I'll change it that way.

Good. Are you referring to a change in glibc or in OpenMP?

> sysconf(_SC_NPROCESSORS_ONLN) must return (3) (this currently scans /proc/stat)

Ok

> sysconf(_SC_NPROCESSORS_CONF) should IMHO return (2) (this currently
> scans /proc/cpuinfo on alpha and sparc{,64} for ((ncpus|CPUs) probed|cpus detected)
> and for the rest just returns sysconf(_SC_NPROCESSORS_ONLN)).

Not quite what I would have guessed, but seems ok.

Thanks for spelling this out.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.925.600.0401
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/