"Thomas" == Thomas De Schampheleire <[EMAIL PROTECTED]> writes:

Thomas> I am looking for a kernel variable which gives me the number of cpus
Thomas> that are present in the system. In uts/common/os/cpu.c the macro NCPU
Thomas> seems to be used, but if I understand correctly this equals the
Thomas> maximum number of cpus supported, but not necessarily present. Is
Thomas> there a specific reason why this code loops over this whole range
Thomas> (which equals 558 in my system) instead of only the present cpus?

Really, you want to loop over the range of CPU IDs, right?  So you
might also care if the lowest numbered available CPU has ID 100 rather
than 0.

There are a number of CPU counting variables in usr/src/uts/common/os/cpu.c
<URL:http://cvs.opensolaris.org/source/xref/onnv/aside/usr/src/uts/common/os/cpu.c>.

Thomas> I would like such a variable in order to loop over all processors.

Thomas> I don't think it matters, but I am using a SPARC-based architecture.

It matters only in that SPARC currently scales to higher numbers of
CPUs and CPU IDs, I suppose.
-- 
Dave Marquardt
Sun Microsystems, Inc.
Austin, TX
+1 512 401-1077 (SUN internal: x64077)
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to