21 Jun 2012 16:54
could some current.h files be simplified?
Robert P. J. Day <rpjday <at> crashcourse.ca>
2012-06-21 14:54:59 GMT
2012-06-21 14:54:59 GMT
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)
RSS Feed