diff options
| author | bors <bors@rust-lang.org> | 2020-10-04 06:48:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-04 06:48:17 +0000 |
| commit | 32cbc65e6bf793d99dc609d11f4a4c93176cdbe2 (patch) | |
| tree | 63c17253897262e610c61eb3c67144edf0da4186 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | 2251766944f355a039e67aeb13ab630b2d46bf9b (diff) | |
| parent | b1ce7a38a6c03ddff23ef7e59e74cab6452ed9b0 (diff) | |
| download | rust-32cbc65e6bf793d99dc609d11f4a4c93176cdbe2.tar.gz rust-32cbc65e6bf793d99dc609d11f4a4c93176cdbe2.zip | |
Auto merge of #77380 - fusion-engineering-forks:unbox-the-mutex, r=dtolnay
Unbox mutexes and condvars on some platforms Both mutexes and condition variables contained a Box containing the actual os-specific object. This was done because moving these objects may cause undefined behaviour on some platforms. However, this is not needed on Windows[1], Wasm[2], cloudabi[2], and 'unsupported'[3], were the box was only needlessly making them less efficient. This change gets rid of the box on those platforms. On those platforms, `Condvar` can no longer verify it is only used with one `Mutex`, as mutexes no longer have a stable address. This was addressed and considered acceptable in #76932. [1]\: https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-initializesrwlock [2]\: These are just a single atomic integer together with futex wait/wake calls/instructions. [3]\: The `unsupported` platform doesn't support multiple threads at all.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
