use of volatile qualifier in Linux kernel source

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

 



Hello,

What are the rules for the use of the 'volatile' qualifier in the Linux kernel source? http://www.embedded.com/story/OEG20010615S0107, which gives a good explanation of the
volatile' qualifier, states that global variables modified by an interrupt service routine and global variables within a multi-threaded application should be declared
volatile.
However, looking e.g. at the task_struct in the 2.4.7 sources, I noticed that only the state and the need_reschedule fields are declared volatile, although I imagine, that
there must be other fields as well (e.g. the pointers linking the task_struct into the various task lists, or the signal related information), which may be modified by
multiple threads and/or service routines - why aren't those (e.g. the run_list or the link_count fields) declared volatile?

Please put me on CC in the reply, since I am not in the mailing list.

thanks in advance for any help,
with best regards
Martin Maletinsky
--
Supercomputing System AG          email: maletinsky@scs.ch
Martin Maletinsky                 phone: +41 (0)1 445 16 05
Technoparkstrasse 1               fax:   +41 (0)1 445 16 10
CH-8005 Zurich
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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