bug-hurd
[Top][All Lists]
Advanced

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

Re: Enable SMP support


From: liberamenso10000
Subject: Re: Enable SMP support
Date: Thu, 14 Jun 2018 23:41:27 +0000

Ok, I agree. I didn't read this docs. I'll try to change it

El Viernes 15 de junio de 2018, Amos Jeffries escribió:
> On 15/06/18 10:31, Almudena Garcia wrote:
> > Yes, I concluded the same a few hours ago. I tried to edit
> > kern/cpu_number.h, to add a new definition with many cores, at this form
> > 
> > int     master_cpu;     /* 'master' processor - keeps time */
> > 
> > #if     (NCPUS == 1)
> >         /* cpu number is always 0 on a single processor system */
> > #define cpu_number()    (0)
> > 
> > #define CPU_L1_SIZE (1 << CPU_L1_SHIFT)
> > 
> > #else
> > #define cpu_number() (NCPUS)
> > 
> 
> I may be wrong, but that does not seem correct.
> 
> The man page for cpu_number() state it to be "an unique CPU
> identification number for the CPU that this thread is running on". So it
> clearly can change at runtime if there are 2+ CPUs on the machine.
> 
> Whereas NCPUS is being used by the precompiler as an integer with fixed
> value that can be known at pre-compile time. Implied by the "#if NCPUS >
> 1" statement which this version of the code omits.
> 
> 
> AYJ
> 
>

-- 
Enviado desde mi Jolla

reply via email to

[Prev in Thread] Current Thread [Next in Thread]