Re: Why use volatile for socket state?

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

 



Hi

Why do we need the socket state (for the nework layer
representation of the sockets) to be
 volatile?
It is implemented as volatile unsigned  char skc_state in
struct sock_common .

I personally think this is done to prevent looking up the state on the
CPU registers. In other word, query is always directed toward physical
memory. Yes, it lowers the perfomance but maybe it is designed that
way so we won't get wrong socket state.

regards,

Mulyadi

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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