4 struct task_struct; 5 6 static inline struct task_struct * get_current(void) 7 { 8 struct task_struct *current; 9 __asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL)); 10 return current; 11 } 12 13 #define current get_current() Look beyond the macro. <quote sender="Nir Tzachar"> > > current is globally defined as > > a task_struct that point to current user. > wrong. > > both in 2.4 and 2.6, current is defined like this: > #define current get_current() , > which return the address by means of the the kernel stack. > > ======================================================================== > nir. > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/