diff options
author | Mattes D <github@xoft.cz> | 2017-01-18 10:51:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-18 10:51:17 +0100 |
commit | 0256daa7ca98bab7482581dad39f66d570030874 (patch) | |
tree | de9232cbf239800ea1e7a71cf52086509a9472ea /src/Bindings/LuaState.cpp | |
parent | Updated Github label links (#3543) (diff) | |
parent | DeadlockDetect now lists some tracked CS's stats. (diff) | |
download | cuberite-0256daa7ca98bab7482581dad39f66d570030874.tar cuberite-0256daa7ca98bab7482581dad39f66d570030874.tar.gz cuberite-0256daa7ca98bab7482581dad39f66d570030874.tar.bz2 cuberite-0256daa7ca98bab7482581dad39f66d570030874.tar.lz cuberite-0256daa7ca98bab7482581dad39f66d570030874.tar.xz cuberite-0256daa7ca98bab7482581dad39f66d570030874.tar.zst cuberite-0256daa7ca98bab7482581dad39f66d570030874.zip |
Diffstat (limited to 'src/Bindings/LuaState.cpp')
-rw-r--r-- | src/Bindings/LuaState.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp index 2acf7df84..ec63d2767 100644 --- a/src/Bindings/LuaState.cpp +++ b/src/Bindings/LuaState.cpp @@ -19,6 +19,7 @@ extern "C" #include "LuaJson.h" #include "../Entities/Entity.h" #include "../BlockEntities/BlockEntity.h" +#include "../DeadlockDetect.h" @@ -2225,6 +2226,24 @@ void cLuaState::LogApiCallParamFailure(const char * a_FnName, const char * a_Par +void cLuaState::TrackInDeadlockDetect(cDeadlockDetect & a_DeadlockDetect) +{ + a_DeadlockDetect.TrackCriticalSection(m_CS, Printf("cLuaState %s", m_SubsystemName.c_str())); +} + + + + + +void cLuaState::UntrackInDeadlockDetect(cDeadlockDetect & a_DeadlockDetect) +{ + a_DeadlockDetect.UntrackCriticalSection(m_CS); +} + + + + + int cLuaState::ReportFnCallErrors(lua_State * a_LuaState) { LOGWARNING("LUA: %s", lua_tostring(a_LuaState, -1)); |