diff --git a/simgear/threads/CMakeLists.txt b/simgear/threads/CMakeLists.txt index 54ec3a7c..5258be8f 100644 --- a/simgear/threads/CMakeLists.txt +++ b/simgear/threads/CMakeLists.txt @@ -1,6 +1,7 @@ include (SimGearComponent) set(HEADERS + SGGuard.hxx SGQueue.hxx SGThread.hxx) diff --git a/simgear/threads/SGGuard.hxx b/simgear/threads/SGGuard.hxx new file mode 100644 index 00000000..1dc4bd2d --- /dev/null +++ b/simgear/threads/SGGuard.hxx @@ -0,0 +1,5 @@ +#pragma once +#pragma message(": warning use std::lock_guard and std::mutex.") + +// backwards compatibility, just needs a recompile +#define SGGuard std::lock_guard diff --git a/simgear/threads/SGThread.hxx b/simgear/threads/SGThread.hxx index ea1fa746..ba9f52d2 100644 --- a/simgear/threads/SGThread.hxx +++ b/simgear/threads/SGThread.hxx @@ -29,6 +29,11 @@ #include #include + +// backwards compatibility, just needs a recompile +#define SGMutex std::mutex + + /** * Encapsulate generic threading methods. * Users derive a class from SGThread and implement the run() member function.