commit | eea7cd3fc5139d7523f3c7a67d9c864b944dfacd | [log] [tgz] |
---|---|---|
author | Paolo Bonzini <pbonzini@redhat.com> | Wed Mar 15 12:34:01 2023 +0100 |
committer | Paolo Bonzini <pbonzini@redhat.com> | Thu May 25 10:18:33 2023 +0200 |
tree | 164f3e6f4bf4d1267c4eb647d2166fe6e3a445c3 | |
parent | 60f4f62efeb174fe7433ce9ebc37836e70ec9b75 [diff] |
monitor: do not use mb_read/mb_set Instead of relying on magic memory barriers, document the pattern that is being used. It is the one based on Dekker's algorithm, and in this case it is embodied as follows: enqueue request; sleeping = true; smp_mb(); smp_mb(); if (sleeping) kick(); if (!have a request) yield(); Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>