]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commit
pcem: fix helper thread handles
authorStefan Reinauer <stefan.reinauer@coreboot.org>
Tue, 26 May 2026 07:19:35 +0000 (00:19 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Mon, 1 Jun 2026 20:38:29 +0000 (13:38 -0700)
commit09e21b3397f537a51916913be8b15e8b3c4dbe2c
tree8bd03a1314af78a73e4844dd8627382aa83ffec2
parent268eb083bb55f10881682668b0600dcbde3cd85f
pcem: fix helper thread handles

The PCem compatibility layer returned a raw uae_thread_id as a
thread_t pointer and then waited on that value through the semaphore
API. That was pointer-shaped on some targets, but it was not a valid
wrapper around UAE's thread API.

Store the uae_thread_id in an explicit PCem handle object, join it
with uae_wait_thread(), and free the wrapper after wait or close. Reset
and signal PCem events through the existing semaphore object instead of
passing the address of a local pointer copy.
pcem/pcemglue.cpp