Skip to content

Commit 94f4227

Browse files
committed
[SYCL] Rename MMutex to MNativeProgramsMutex
Signed-off-by: Alexander Flegontov <[email protected]>
1 parent e2395a1 commit 94f4227

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ RT::PiProgram ProgramManager::createPIProgram(const RTDeviceBinaryImage &Img,
330330
: createBinaryProgram(Ctx, RawImg.BinaryStart, ImgSize);
331331

332332
{
333-
std::lock_guard<mutex_class> Lock(MMutex);
333+
std::lock_guard<mutex_class> Lock(MNativeProgramsMutex);
334334
// associate the PI program with the image it was created for
335335
NativePrograms[Res] = &Img;
336336
}
@@ -982,7 +982,7 @@ void ProgramManager::flushSpecConstants(const program_impl &Prg,
982982
if (!Img) {
983983
// caller hasn't provided the image object - find it
984984
{ // make sure NativePrograms map access is synchronized
985-
std::lock_guard<mutex_class> Lock(MMutex);
985+
std::lock_guard<mutex_class> Lock(MNativeProgramsMutex);
986986
auto It = NativePrograms.find(NativePrg);
987987
if (It == NativePrograms.end())
988988
throw sycl::experimental::spec_const_error(

sycl/source/detail/program_manager/program_manager.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ class ProgramManager {
181181
// NOTE: keys in the map can be invalid (reference count went to zero and
182182
// the underlying program disposed of), so the map can't be used in any way
183183
// other than binary image lookup with known live PiProgram as the key.
184-
// NOTE: access is synchronized via the MMutex
184+
// NOTE: access is synchronized via the MNativeProgramsMutex
185185
std::unordered_map<pi::PiProgram, const RTDeviceBinaryImage *> NativePrograms;
186186

187187
/// Protects NativePrograms that can be changed by class' methods.
188-
mutex_class MMutex;
188+
mutex_class MNativeProgramsMutex;
189189
/// True iff a SPIRV file has been specified with an environment variable
190190
bool m_UseSpvFile = false;
191191
};

0 commit comments

Comments
 (0)