If pthread mutex initialization fails, the failure will go unnoticed unless debug assertions are enabled. Any subsequent use of mutex will also silently fail, since return values from lock & unlock operations are similarly checked only through debug assertions. In some implementations the mutex initialization requires a memory allocation and so it does fail in practice. Check that initialization succeeds to ensure that mutex guarantees mutual exclusion. |
||
|---|---|---|
| .. | ||
| cloudabi | ||
| hermit | ||
| sgx | ||
| unix | ||
| unsupported | ||
| vxworks | ||
| wasi | ||
| wasm | ||
| windows | ||
| mod.rs | ||