Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Apr 2003 00:33:23 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        FreeBSD current users <current@FreeBSD.ORG>
Subject:   Re: variable mp_ncpu
Message-ID:  <Pine.BSF.4.21.0304100028020.55025-100000@InterJet.elischer.org>
In-Reply-To: <Pine.BSF.4.21.0304100022040.55025-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help






On Thu, 10 Apr 2003, Julian Elischer wrote:

> 
> Would it be possible to have the sysclt hw.ncpu 
> always available, even in a UP kernel?

I meant "to a kernel routine"

> 
> it is currently only valid in an SMP kernel
> whichmeans that userland code that needs to know this has to do:

ok It's too late at night.. hw.ncpu does exist in UP
what I really meant to say is:
could there always be the kernel variable mp_ncpus?

for example the following code is in the kernel:
 605         /* Too bad, why hasn't kernel always a cpu counter !? */
 606 #ifdef SMP
 607         ncpus = mp_ncpus;
 608 #else
 609         ncpus = 1;
 610 #endif


ok, so maybe it would need to be renamed, but at teh moment I need to 
have 2 kernel modules, one for SMP and one for UP to be able to cope
with this if it needs to know how many cpus there are..
(or am I missing something still)







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0304100028020.55025-100000>