Because that way the data type is more generic. If, in the future, it is decided to be changed from int to something else, you won't have to change anything in your code. This is a foundamental concept in ADTs and generally a good way of programming. > I wonder why atomic_t is defined as a structure containing an integer > rather than just a simple integer? > What are the advantages? > > Hope somebody can explain this, please cc me. > > -- > To unsubscribe from this list: send an email with > "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx > Please read the FAQ at http://kernelnewbies.org/FAQ > > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ