Unverified Commit 66784dcb authored by Johannes Doerfert's avatar Johannes Doerfert Committed by GitHub
Browse files

[OpenMP] Ensure `Devices` is accessed exlusively (#74374)

We accessed the `Devices` container most of the time while holding the
RTLsMtx, but not always. Sometimes we used the mutex for the size query,
but then accessed Devices again unguarded. From now we properly
encapsulate the container in a ProtectedObj which ensures exclusive
accesses. We also hide the "isReady" part in the `getDevice` accessor
and use an `llvm::Expected` to allow to return errors.
parent d6f4d520
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment