[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Number of processors



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A long time ago, in a galaxy far, far way, someone said...

> Nope.  We have to use some "C" or "C++" system/function call.  Our
> programmers don't want to depend on the /proc file system being
> available.

If you're looking for an OS independant way of doing such things (ie the
same between Linux, *BSD, Windows, BeOS, Solaris, etc) the interfaces
don't exist.

On Linux the method for userspace to know about the hardware is to use the
files under /proc.  That's what they're there for.

BTW most system utilities require access to /proc anyway, making a Linux
system without /proc a pain in the butt to administer.  IMO you have no
choice but to rely on it.

Hope you don't need to rely on the processor features enumerated in
/proc/cpuinfo - it is not consistent for all architectures Linux supports
:(

- -- 
- ----------------------------------------------------------------------
Phil Brutsche				    pbrutsch@tux.creighton.edu

GPG fingerprint: 9BF9 D84C 37D0 4FA7 1F2D  7E5E FD94 D264 50DE 1CFC
GPG key id: 50DE1CFC
GPG public key: http://tux.creighton.edu/~pbrutsch/gpg-public-key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6LVh2/ZTSZFDeHPwRAsVdAKDhIY/B95acLSzy+NT/MoEmuDrxQQCgyens
h4tsm1+bNtT5c2VzLAwpPd8=
=fDby
-----END PGP SIGNATURE-----



Reply to: