9 Aug
2023
9 Aug
'23
1:35 p.m.
I implemented a version of SRWLOCK that looks a bit more like Windows'. I tried my hardest to make this correct, but given how convoluted this is I am sure there are still problems left. So please help me scrutinize the code. Honestly Windows' way of doing SRWLOCK is pretty cursed. They store waiters in a _doubly_ linked list, and each node also stores a pointer to the head of the list. The list has to support appending from one end and removing from the other. All these make implementing it with atomics a nightmare. My brain is properly fried right now. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3504#note_41790