https://bugs.winehq.org/show_bug.cgi?id=56260
--- Comment #9 from Fabian Maurer dark.shadow4@web.de ---
Hi Fabian, I put together a patch to emulate 16-bit hardware interrupts in Wine by suspending other task threads while executing the callback. Could you take a look before I send it upstream?
Sure, thanks!
I find the wowthunk diff hard to follow (that's why I tend to add extra commits just to fix indentation/names), but as I understand it you replace the lock with a suspension of threads instead.
Questions: - If we don't have an interrupt, in WOWTHUNK_CallWithRegs, why don't we use the lock instead? - I don't really understand the WCB16_REGS flag yet, what's the difference? - in task_start can't we move the assignment to teb before the TASK_LinkTask and then let TASK_LinkTask/TASK_UnLinkTask handle the critical section themselves? If I understand correctly, you only have that outside to guard against therace condition where task is linked but teb not assigned.
Apart from not understanding the interactions with the rest of the Win16 system, this looks good to me.