samedi 7 août 2021

"asm volatile ("" ::: "memory");" does not work in c++

I was trying to follow the queue implementation in this blog that uses a memory barries like below:

asm volatile ("" ::: "memory");

But the same is not working for me and throwing this error:

error C2589: ':': illegal token on right side of '::'

How to express the same memory barrier in c++11?

Aucun commentaire:

Enregistrer un commentaire