#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
// no-op
}
-OpenThreads::Mutex SGCommandMgr::_instanceMutex;
+SGMutex SGCommandMgr::_instanceMutex;
SGCommandMgr*
SGCommandMgr::instance()
if (mgr.get())
return mgr.get();
- OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_instanceMutex);
+ SGGuard<SGMutex> lock(_instanceMutex);
if (mgr.get())
return mgr.get();
command_map::const_iterator last = _commands.end();
while (it != last) {
names.push_back(it->first);
- it++;
+ ++it;
}
return names;
}
command_t command = getCommand(name);
if (command == 0)
return false;
-
-
+
+
try {
return (*command)(arg);
} catch (sg_exception& e) {