The Linux Kernel - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

The Linux Kernel

jbowers9jbowers9 Posts: 8Member
Hello,
Recently I picked up a publication called "The Linux Programming Guide: White Pages" from Coriolis press. There are various authors contributing. It's extremely intriguing but in certain areas very nearly incomprehensible - at least to me. I’ve studied C programming and am familiar w/linked lists and data structures but there are some references made in the source code that mystify me. For instance:

In the 'task_struct' data structure what does "volatile long;"
mean?

In the data declaration "int dumpable:1:" what does the ':1' do?

In the 'sock' data structure what does "atomic_t wmem_alloc;" mean?
Same for "_32 write_seq;". Are they casting operators?

Finally, can someone point me in the right direction as far as finding information either online or hardcopy so that I can learn more about this area? Thank you.
jbowers9

Comments

  • GsibberyGsibbery Posts: 11Member
    The volatile keyword acts as a "data type qualifier". The qualifier alters the default why in which the compiler handles the variable and does not attempt to optimize the storage referenced by it. Volatile basically means the storage is likely to change at anytime and be changed but something outside the control of the user program. This means that if you reference the variable, the program should always check the physical address (ie a mapped input fifo), and not use it in a cashed way.
Sign In or Register to comment.