What is wmb () in the linux driver

In one of the PCI DMA drivers, I saw wmb () many times. What does the wmb () function actually do? Somewhere it is referred to as "holy water that does not hurt." What is the purpose of this feature?

+4
source share
2 answers

Stakx's comment on your question already points to the complete answer : indeed, this is a write memory barrier.

But if you are not familiar with this concept, the document may not contain enough information about the why.

, , . . , - .

:

   *serial = 'h';
   *serial = 'e';
   *serial = 'l';
   *serial = 'l';
   *serial = 'o';

, , (, , , ).

, , . , , wmb(): .

, volatile volatile : , , . .

- , PDF .

+11

Wmb . flow.its . . wmb() .

+2

All Articles