Robert P. J. Day | 21 Jun 2012 16:54
Picon
Gravatar

could some current.h files be simplified?


  it *seems* as if a number of current.h files from various
architectures could be simplified.  here's <asm-generic/current.h>,
which gives any architecture a generic starting point in defining both
get_current() and current:

#ifndef __ASM_GENERIC_CURRENT_H
#define __ASM_GENERIC_CURRENT_H

#include <linux/thread_info.h>

#define get_current() (current_thread_info()->task)
#define current get_current()

#endif /* __ASM_GENERIC_CURRENT_H */

  and if that's acceptable, any architecture is welcome to simply
include it as, for instance, mips does in <asm/current.h>:

#include <asm-generic/current.h>

but here's the current.h file for parisc:

#ifndef _PARISC_CURRENT_H
#define _PARISC_CURRENT_H

#include <linux/thread_info.h>

struct task_struct;

(Continue reading)

Vladimir Murzin | 23 Jun 2012 15:34
Picon

Re: could some current.h files be simplified?

On Thu, Jun 21, 2012 at 10:54:59AM -0400, Robert P. J. Day wrote:
> 
>   it *seems* as if a number of current.h files from various
> architectures could be simplified.  here's <asm-generic/current.h>,
> which gives any architecture a generic starting point in defining both
> get_current() and current:
> 
> #ifndef __ASM_GENERIC_CURRENT_H
> #define __ASM_GENERIC_CURRENT_H
> 
> #include <linux/thread_info.h>
> 
> #define get_current() (current_thread_info()->task)
> #define current get_current()
> 
> #endif /* __ASM_GENERIC_CURRENT_H */
> 
>   and if that's acceptable, any architecture is welcome to simply
> include it as, for instance, mips does in <asm/current.h>:
> 
> #include <asm-generic/current.h>
> 
> but here's the current.h file for parisc:
> 
> #ifndef _PARISC_CURRENT_H
> #define _PARISC_CURRENT_H
> 
> #include <linux/thread_info.h>
> 
> struct task_struct;
(Continue reading)


Gmane