added: a deadlock counter to Synchro class

now we can use Lock() more than one in the same thread
       and next Unlock() will recognize it
       sample:
       Lock(); // first lock -- resources locked
       Lock(); // second lock -- skipped (counter incremented)
       ...
       Unlock(); // first unlock -- skipped (because counter greater than zero)
       Unlock(); // second unlock -- actually unlocking


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@830 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-04-28 20:57:57 +00:00
parent 1da1eef768
commit fc33b4f882
5 changed files with 74 additions and 16 deletions

View File

@@ -225,19 +225,20 @@ private:
Synchro * synchro;
SessionManager * session_manager;
std::wstring temp_path;
std::wstring temp_path; // used when loading plugins
std::string afilename;
Plugins plugins;
typedef std::multimap<int, Slot> Slots;
Slots slots;
std::string afilename;
void * LoadInitFun(const char * filename, Fun1 & fun_init);
void Call(Session * ses, int message, Slots::iterator & slot, PluginInfo & info);
bool SetPointers(PluginInfo & info);
void Lock();
void Unlock();
};