unifdef

From: Rick Hohensee (humbubba@smarty.smart.net)
Date: Sat Jul 29 2000 - 02:25:46 EST


I just posted unifdef.c to comp.unix.programmer. It extracts #ifdef'ed
code. It's hardwired to "#ifdef CONFIG_SMP". It doesn't do #ifndef, and it
gets a bit over a meg of SMP out of 2.4, with suitable sh/grep wrapping.
It's 2 hours work, running entirely on bugs.
The end of the output I got with a bit of wrapping looked like this....

linux/arch/s390/kernel/time.c
#ifdef CONFIG_SMP
extern __u16 boot_cpu_addr;
#endif
#ifdef CONFIG_SMP
        if(S390_lowcore.cpu_data.cpu_addr==boot_cpu_addr) {
                write_lock(&xtime_lock);
                last_timer_cc = S390_lowcore.jiffy_timer_cc;
        }
#else
#ifdef CONFIG_SMP
        /* when SMP, do smp_local_timer_interrupt for *all* CPUs,
           but only do the rest for the boot CPU */
        smp_local_timer_interrupt(regs);
#else
#ifdef CONFIG_SMP
        if(S390_lowcore.cpu_data.cpu_addr==boot_cpu_addr)
#endif
#ifdef CONFIG_SMP
                write_unlock(&xtime_lock);
#endif
linux/arch/s390/lib/delay.c
#ifdef CONFIG_SMP
#include <asm/smp.h>
#endif
linux/Documentation/Configure.help
linux/Documentation/smp.txt
linux/Documentation/kbuild/config-language.txt
linux/Documentation/DocBook/kernel-locking.tmpl
linux/Documentation/DocBook/kernel-locking.tmpl
*snip*

Apologies to l-k if recent cpp's have this.

Rick Hohensee
rick@clienux.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:29 EST