Closed
Description
Currently, I see that Mutex locks on Windows using TryAcquireSRWLockExclusive and AcquireSRWLockExclusive. The former only supports Windows 7 and above, while the latter supports Windows Vista and above.
Using the APIs of both resulted in compatibility only with Windows 7 and not supporting Windows XP, Windows 2003, Windows 2008. if you want run this exe will be can't find TryAcquireSRWLockExclusive on kernel32.dll
see this example :
fn main() {
println!("Hello, world!");
}
What I want to ask is why not move the API called by the operating system to a replaceable plugin, such as the toolchain toolchain in Rust, so This is more flexible, and we can build our own toolchain that is compatible with older versions of the operating system