lkml.org 
[lkml]   [2003]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] more procfs bits for !CONFIG_MMU

On Thu, 2 Jan 2003, Christoph Hellwig wrote:
>
> To avoid ifdef hell I extented the task_foo() abstraction already
> present in array.c a bit and the actual implementations now live
> in task_mmu.c and task_nommu.c.

Please do "proc_mmu.c" and "proc_nommu.c", and move the non-task-related
parts there too (ie move "pid_maps_read()" there too, and just make the
no-mmu version of it be empty or whatever, ok?)

That should get rid of the last CONFIG_MMU #ifdef stuff.

Also:

> --- 1.4/fs/proc/Makefile Sat Dec 14 07:38:56 2002
> +++ edited/fs/proc/Makefile Wed Jan 1 13:45:28 2003
> @@ -9,6 +9,12 @@
> proc-objs := inode.o root.o base.o generic.o array.o \
> kmsg.o proc_tty.o proc_misc.o kcore.o
>
> +ifeq ($(CONFIG_MMU),y)
> +proc-objs += task_mmu.o
> +else
> +proc-objs += task_nommu.o
> +endif

Isn't it much nicer to just write this something like

proc-mmu-y = proc_mmu.o
proc-mmu-n = proc_nommu.o

obj-y += $(proc-mmu-$(CONFIG_MMU))

instead, and avoid conditionals?

Linus

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

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.067 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site