]> git.mxchange.org Git - simgear.git/blobdiff - simgear/structure/commands.cxx
Working 'noshadow' animation
[simgear.git] / simgear / structure / commands.cxx
index fd67ae4fc3edebac035ca0f5cf02ea86a48853fd..266cdb4ce3b0177b269e102295647a32515b262e 100644 (file)
 #include <memory>
 #include <simgear/props/props_io.hxx>
 
-#include <OpenThreads/Mutex>
-#include <OpenThreads/ScopedLock>
-
 #include "commands.hxx"
 
-#include <simgear/math/SGMath.hxx>
 #include <simgear/structure/exception.hxx>
+#include <simgear/threads/SGThread.hxx>
+#include <simgear/threads/SGGuard.hxx>
 #include <simgear/debug/logstream.hxx>
 
 \f
@@ -36,7 +34,7 @@ SGCommandMgr::~SGCommandMgr ()
   // no-op
 }
 
-OpenThreads::Mutex SGCommandMgr::_instanceMutex;
+SGMutex SGCommandMgr::_instanceMutex;
 
 SGCommandMgr*
 SGCommandMgr::instance()
@@ -45,7 +43,7 @@ SGCommandMgr::instance()
   if (mgr.get())
     return mgr.get();
 
-  OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_instanceMutex);
+  SGGuard<SGMutex> lock(_instanceMutex);
   if (mgr.get())
     return mgr.get();
 
@@ -85,8 +83,8 @@ SGCommandMgr::execute (const std::string &name, const SGPropertyNode * arg) cons
   command_t command = getCommand(name);
   if (command == 0)
     return false;
-  
-  
+
+
   try {
     return (*command)(arg);
   } catch (sg_exception& e) {