Re: [PATCH 1/10] UML - _switch_to code consolidation

From: Pavel Machek
Date: Thu Sep 15 2005 - 04:59:36 EST


Hi!

> This patch moves code that is in both switch_to_tt and
> switch_to_skas to the top level _switch_to function, keeping us from
> duplicating code. It is required for the stack trace patch to work
> properly.
>
> Signed-off-by: Allan Graves <allan.graves@xxxxxxxxx>
> Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>
>
> Index: linux-2.6.13/arch/um/kernel/process_kern.c
> ===================================================================
> --- linux-2.6.13.orig/arch/um/kernel/process_kern.c 2005-09-13 16:04:11.000000000 -0400
> +++ linux-2.6.13/arch/um/kernel/process_kern.c 2005-09-13 16:08:18.000000000 -0400
> @@ -113,8 +113,16 @@
>
> void *_switch_to(void *prev, void *next, void *last)
> {
> - return(CHOOSE_MODE(switch_to_tt(prev, next),
> - switch_to_skas(prev, next)));
> + struct task_struct *from = prev;
> + struct task_struct *to= next;
> +
> + to->thread.prev_sched = from;
> + set_current(to);
> +
> + CHOOSE_MODE_PROC(switch_to_tt, switch_to_skas, prev, next);
> +
> + return(current->thread.prev_sched);
> +
> }

I sense a whitespace damage here.
Pavel

--
if you have sharp zaurus hardware you don't need... you know my address
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/