Re: [PATCH v2 3/9] qemu-thread: Avoid futex abstraction for non-Linux

2025-05-10 Thread Akihiko Odaki
On 2025/05/11 0:02, Paolo Bonzini wrote: On 5/10/25 10:51, Akihiko Odaki wrote: Add special implementations of qemu_event_set() and qemu_event_wait() using pthread primitives. qemu_event_wait() will ensure qemu_event_set() finishes, and these functions will avoid complex barrier and atomic opera

Re: [PATCH v2 3/9] qemu-thread: Avoid futex abstraction for non-Linux

2025-05-10 Thread Paolo Bonzini
On 5/10/25 10:51, Akihiko Odaki wrote: Add special implementations of qemu_event_set() and qemu_event_wait() using pthread primitives. qemu_event_wait() will ensure qemu_event_set() finishes, and these functions will avoid complex barrier and atomic operations. Unfortunately not... Signed-off

[PATCH v2 3/9] qemu-thread: Avoid futex abstraction for non-Linux

2025-05-10 Thread Akihiko Odaki
qemu-thread used to abstract pthread primitives into futex for the QemuEvent implementation of POSIX systems other than Linux. However, this abstraction has one key difference: unlike futex, pthread primitives require an explicit destruction, and it must be ordered after wait and wake operations.