Files
rust/library/std/src
bors 3314d5ce4c Auto merge of #121956 - ChrisDenton:srwlock, r=joboet
Windows: Implement condvar, mutex and rwlock using futex

Well, the Windows equivalent: [`WaitOnAddress`,](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitonaddress) [`WakeByAddressSingle`](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-wakebyaddresssingle) and [`WakeByAddressAll`](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-wakebyaddressall).

Note that Windows flavoured futexes can be different sizes (1, 2, 4 or 8 bytes). I took advantage of that in the `Mutex` implementation.

I also edited the Mutex implementation a bit more than necessary. I was having trouble keeping in my head what 0, 1 and 2 meant so I replaced them with consts.

I *think* we're maybe spinning a bit much. `WaitOnAddress` seems to be looping quite a bit too. But for now I've keep the implementations the same. I do wonder if it'd be worth reducing or removing our spinning on Windows.

This also adds a new shim to miri, because of course it does.

Fixes #121949
2024-03-06 12:19:40 +00:00
..
2023-12-10 10:56:22 +08:00
2023-12-10 10:56:22 +08:00
2023-08-13 13:07:53 -06:00
2023-12-22 11:01:42 +01:00
2023-12-10 10:56:22 +08:00
2024-01-11 11:30:12 -05:00
2023-12-10 10:56:22 +08:00
2024-03-05 20:48:48 +00:00
2023-05-03 22:09:33 -07:00
2024-02-29 14:28:47 -05:00
2023-11-26 09:25:07 +08:00
2023-12-12 18:12:23 +08:00
2024-01-27 16:38:57 +01:00
2024-02-28 14:56:36 -08:00
2023-12-15 16:17:28 +00:00