Atomic Types in C language

5

What is the difference between primitive and atomic types?

What is the purpose of atomic types?

In what situations are they applied?

    
asked by anonymous 24.08.2018 / 04:04

1 answer

1

There is a big difference between primitive types and atomic types.

Atomic types are free of data races and can be modified and / or accessed by two different threads. An atomic data is widely used when, for example, we have 2 distinct actions that are executed in this data, such as reading and writing, this type of data is also widely used in operating systems, where it is necessary for a data to be accessed by different threads.

It's wrong to say that, but it would be something close to an asynchronous operation.

    
31.08.2018 / 14:17