How code for waiting a spinlock?

Only code a loop statement ? There seems to be an asm “pause” instruction, cound i directly code it to mlir ?

A spinlock is by definition a loop in which the thread waits for a condition. That being said, the LLVM dialect has support for inline assembly 'llvm' Dialect - MLIR.

the inline_asm instruction have some difficulties to me. if you know how to build a “pause” instruction by “builder.createmlir::LLVM::InlineAsmOp(…)”, please write it here. thank you very much. :pray: :pray: :pray: