Skip to content

Commit f19c973

Browse files
committed
[SYCL] Change MNativeProgramsMutex's type to std::mutex for consistency
Signed-off-by: Alexander Flegontov <[email protected]>
1 parent 94f4227 commit f19c973

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
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(MNativeProgramsMutex);
333+
std::lock_guard<std::mutex> 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(MNativeProgramsMutex);
985+
std::lock_guard<std::mutex> 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class ProgramManager {
185185
std::unordered_map<pi::PiProgram, const RTDeviceBinaryImage *> NativePrograms;
186186

187187
/// Protects NativePrograms that can be changed by class' methods.
188-
mutex_class MNativeProgramsMutex;
188+
std::mutex 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)