some doubt in struct task data member..

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

 



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..

Thanks
Suman




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux