If I execute "grep -R "NCPUS > 1", it returns this files ;)

kern/machine.c:#if    NCPUS > 1
kern/machine.c:#endif    /* NCPUS > 1 */
kern/machine.c:#if    NCPUS > 1
kern/machine.c:#else    /* NCPUS > 1 */
kern/machine.c:#endif /* NCPUS > 1 */
kern/processor.c:#if    NCPUS > 1
kern/processor.c:#endif    /* NCPUS > 1 */
kern/processor.c:#if    NCPUS > 1
kern/processor.c:#else    /* NCPUS > 1 */
kern/processor.c:#endif    /* NCPUS > 1 */
kern/processor.c:#if    NCPUS > 1
kern/processor.c:#else    /* NCPUS > 1 */
kern/processor.c:#endif    /* NCPUS > 1 */
kern/processor.c:#if    NCPUS > 1
kern/processor.c:#else    /* NCPUS > 1 */
kern/processor.c:#endif    /* NCPUS > 1 */
kern/processor.c:#if    NCPUS > 1
kern/processor.c:#else    /* NCPUS > 1 */
kern/processor.c:#endif    /* NCPUS > 1 */
kern/mach_clock.c:#if    NCPUS > 1
kern/mach_clock.c:#endif    /* NCPUS > 1 */
kern/mach_clock.c:#if    NCPUS > 1
kern/mach_clock.c:#endif    /* NCPUS > 1 */
kern/mach_clock.c:#if    NCPUS > 1
kern/mach_clock.c:#endif    /* NCPUS > 1 */
kern/mach_clock.c:#if    NCPUS > 1
kern/mach_clock.c:#endif    /* NCPUS > 1 */
kern/startup.c:#if    NCPUS > 1
kern/startup.c:#endif    /* NCPUS > 1 */
kern/startup.c:#if    NCPUS > 1
kern/startup.c:#endif    /* NCPUS > 1 */
kern/startup.c:#if    NCPUS > 1
kern/startup.c:#endif    /* NCPUS > 1 */
kern/ast.h:#if    NCPUS > 1
kern/syscall_subr.c:#if    NCPUS > 1
kern/syscall_subr.c:#endif    /* NCPUS > 1 */
kern/syscall_subr.c:#if    NCPUS > 1
kern/syscall_subr.c:#endif    /* NCPUS > 1 */
kern/syscall_subr.c:#if    NCPUS > 1
kern/syscall_subr.c:#endif    /* NCPUS > 1 */
kern/sched_prim.c:#if    NCPUS > 1
kern/sched_prim.c:#endif    /* NCPUS > 1 */
kern/sched_prim.c:#if    NCPUS > 1
kern/sched_prim.c:#endif    /* NCPUS > 1 */
kern/sched_prim.c:#if    NCPUS > 1
kern/sched_prim.c:#endif    /* NCPUS > 1 */
kern/sched_prim.c:#if    NCPUS > 1
kern/sched_prim.c:#else    /* NCPUS > 1 */
kern/sched_prim.c:#endif    /* NCPUS > 1 */
kern/processor.h:#if    NCPUS > 1
kern/processor.h:#endif    /* NCPUS > 1 */
kern/processor.h:#if    NCPUS > 1
kern/processor.h:#endif    /* NCPUS > 1 */
kern/processor.h:#if    NCPUS > 1
kern/processor.h:#endif    /* NCPUS > 1 */
kern/ast.c:#if    NCPUS > 1
kern/ast.c:#endif    /* NCPUS > 1 */
kern/thread.c:#if    NCPUS > 1
kern/thread.c:#endif    /* NCPUS > 1 */
kern/thread.c:#if    NCPUS > 1
kern/thread.c:#endif    /* NCPUS > 1 */
kern/eventcount.c:#if (NCPUS > 1)
kern/eventcount.c:#if NCPUS > 1
kern/eventcount.c:#if (NCPUS > 1)
kern/eventcount.c:#endif    /* NCPUS > 1 */
kern/lock_mon.c:#if    NCPUS > 1 && MACH_LOCK_MON
kern/lock_mon.c:#endif    /* NCPUS > 1 && MACH_LOCK_MON */
kern/debug.c:#if NCPUS > 1
kern/debug.c:#if    NCPUS > 1
kern/priority.c:#if    NCPUS > 1
kern/priority.c:#if    NCPUS > 1
kern/priority.c:#endif    /* NCPUS > 1 */
kern/priority.c:#if    NCPUS > 1
kern/priority.c:#else    /* NCPUS > 1 */
kern/priority.c:#endif    /* NCPUS > 1 */
kern/priority.c:#if    NCPUS > 1
kern/priority.c:#endif    /* NCPUS > 1 */
kern/ipc_sched.c:#if    NCPUS > 1
kern/ipc_sched.c:#else    /* NCPUS > 1 */
kern/ipc_sched.c:#endif    /* NCPUS > 1 */
kern/ipc_sched.c:#if    NCPUS > 1
kern/ipc_sched.c:#endif    /* NCPUS > 1 */
kern/lock.h:#if NCPUS > 1
kern/lock.h:#define MACH_SLOCKS    ((NCPUS > 1) || MACH_LDEBUG)
kern/lock.h:#if    (NCPUS > 1)
kern/lock.h:#else    /* NCPUS > 1 */
kern/lock.h:#endif    /* NCPUS > 1 */
kern/lock.c:#if    NCPUS > 1
kern/lock.c:#endif    /* NCPUS > 1 */
kern/lock.c:#if    NCPUS > 1
kern/lock.c:#else    /* NCPUS > 1 */
kern/lock.c:#endif    /* NCPUS > 1 */
kern/thread.h:#if    NCPUS > 1
kern/thread.h:#endif    /* NCPUS > 1 */
device/dev_master.h:#if    NCPUS > 1
device/dev_master.h:#else    NCPUS > 1
device/dev_master.h:#endif    NCPUS > 1
i386/linux/dev/include/linux/autoconf.h:#if NCPUS > 1
i386/i386/ast_check.c:#if    NCPUS > 1
i386/i386/ast_check.c:#endif    /* NCPUS > 1 */
i386/i386/cswitch.S:#if    NCPUS > 1
i386/i386/cswitch.S:#endif    /* NCPUS > 1 */
i386/i386/spl.S:#if NCPUS > 1
i386/i386/db_interface.c:#if    NCPUS > 1
i386/i386/db_interface.c:#endif    /* NCPUS > 1 */
i386/i386/db_interface.c:#if    NCPUS > 1
i386/i386/db_interface.c:#endif    /* NCPUS > 1 */
i386/i386/db_interface.c:#if    NCPUS > 1
i386/i386/db_interface.c:#endif    /* NCPUS > 1 */
i386/i386/db_interface.c:#if    NCPUS > 1
i386/i386/db_interface.c:#endif    /* NCPUS > 1 */
i386/i386/pcb.c:#if    NCPUS > 1
i386/i386/pcb.c:#if    NCPUS > 1
i386/i386/fpu.h:#if    NCPUS > 1
i386/i386/mp_desc.c:#if    NCPUS > 1
i386/i386/mp_desc.c:#endif    /* NCPUS > 1 */
i386/i386/fpu.c:#else    /* NCPUS > 1 */
i386/i386/lock.h:#if NCPUS > 1
i386/i386/lock.h:#endif /* NCPUS > 1 */
i386/i386/cpu_number.h:#if    NCPUS > 1
i386/intel/pmap.h:#if    NCPUS > 1
i386/intel/pmap.h:#endif    /* NCPUS > 1 */
i386/intel/pmap.h:#if    NCPUS > 1
i386/intel/pmap.h:#else    /* NCPUS > 1 */
i386/intel/pmap.h:#endif    /* NCPUS > 1 */
i386/intel/pmap.h:#if NCPUS > 1
i386/intel/pmap.h:#endif    /* NCPUS > 1 */
i386/intel/pmap.c:#if    NCPUS > 1
i386/intel/pmap.c:#else    /* NCPUS > 1 */
i386/intel/pmap.c:#endif    /* NCPUS > 1 */
i386/intel/pmap.c:#if    NCPUS > 1
i386/intel/pmap.c:#endif    /* NCPUS > 1 */
i386/intel/pmap.c:#if    NCPUS > 1
i386/intel/pmap.c:#endif    /* NCPUS > 1 */
i386/intel/pmap.c:#if    NCPUS > 1
i386/intel/pmap.c:#endif    /* NCPUS > 1 */
i386/intel/pmap.c:#if    NCPUS > 1
i386/intel/pmap.c:#endif    /* NCPUS > 1 */
i386/intel/pmap.c:#if    NCPUS > 1
i386/intel/pmap.c:#else    /* NCPUS > 1 */
i386/intel/pmap.c:#endif    /* NCPUS > 1 */
ddb/db_command.c:#if    NCPUS > 1
ddb/db_mp.c:#if    NCPUS > 1
ddb/db_mp.c:#endif    /* NCPUS > 1 */


El jue., 30 ago. 2018 a las 20:39, Samuel Thibault (<samuel.thiba...@gnu.org>)
escribió:

> Almudena Garcia, le jeu. 30 août 2018 20:30:57 +0200, a ecrit:
> > For example, I saw the duplicated code in pmap.h and pmap.c.
>
> Which duplication? All I see there is macros which are non-trivial in
> the SMP case, and very trivial in the non-SMP case.
>
> > Also in kern/ cpu_number.h (the code what I fixed),
>
> Well, that's only to be expected: in non-SMP case it is trivial, and in
> the SMP case it is not.
>
> > and many codes in kern/ directory.
>
> Please be more specific :)
>
> > is there any guide to understanding GNU Mach code? To learn about what
> do each
> > file.
>
> I don't know, I guess the wiki has pointers. Probably there is also
> reading about the Mach kernel in general (GNU Mach is really largely
> based on the Mach family).
>
> Samuel
>

Reply via email to