Windows NT synchronization primitives for Linux
Windows NT synchronization primitives for Linux
Posted Feb 17, 2024 9:20 UTC (Sat) by pbonzini (subscriber, #60935)In reply to: Windows NT synchronization primitives for Linux by Sesse
Parent article: Windows NT synchronization primitives for Linux
Posted Feb 17, 2024 9:43 UTC (Sat)
by itsmycpu (guest, #139639)
[Link] (3 responses)
Posted Feb 18, 2024 15:57 UTC (Sun)
by tialaramex (subscriber, #21167)
[Link] (2 responses)
... with what they have to do if you only have POSIX threads: https://github.com/rust-lang/rust/blob/master/library/std...
Between "It's very stupid but POSIX technically allows this, so we need to cope" on one hand, and people just straight up not complying with POSIX anyway on the other I'd have thrown all of my toys out of the pram before writing the latter monster.
† Technically unlike the C mutex, a Rust Mutex<T> is a wrapper for a type T, the code I've linked isn't about that part, just the part with the actual mechanics of a mutex which are platform specific.
Posted Feb 18, 2024 19:57 UTC (Sun)
by intelfx (subscriber, #130118)
[Link] (1 responses)
I'm not seeing anything criminal there. Certainly not a monster. WDYM?
Posted Feb 19, 2024 10:31 UTC (Mon)
by tialaramex (subscriber, #21167)
[Link]
_ = libc::pthread_mutex_lock(raw(self)); // Should be fine, but instead there's a whole mess
Windows NT synchronization primitives for Linux
Windows NT synchronization primitives for Linux
Windows NT synchronization primitives for Linux
>
> [...] I'd have thrown all of my toys out of the pram before writing the latter monster [...]
Windows NT synchronization primitives for Linux