On Thu, 2006-11-02 at 09:52 +0530, suman adak wrote: > i have seen this struct task in schd.h file > struct task_struct { > volatile long state; /* -1 unrunnable, 0 runnable, >0 > stopped */ > struct thread_info *thread_info; > atomic_t usage; > unsigned long flags; > ........ > ........ > } > > can anybody pointout me , why state variable is declared as long. I > wrote one simple module programming to print state value for each > task. > I have seen the it is returning 0 or 1 only. Is it not wastage of > kernel memory declaring as long type as we can do with short int? > Or i am missing something else.. Maybe for cache aligning purposes.. > > Thanks > Suman > > > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/