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

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

 



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 <[email protected]>
> Signed-off-by: Jeff Dike <[email protected]>
> 
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux