diff options
author | George Hazan <george.hazan@gmail.com> | 2015-03-07 19:39:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-03-07 19:39:33 +0000 |
commit | 8e91cc3b73d6c77c79781115fc1acbbb7fddfe32 (patch) | |
tree | d0afc2226cca8c60656eb0f89a3bf0788525d2aa /protocols/IcqOscarJ/src/utilities.h | |
parent | 7ad29f87c6d2be2b8fd48c25c94a21b7a5db7b0d (diff) |
- old ugly borkred mutexes removed from ICQ, cause all threads work as expected for a long time;
- even older ugly linked list of avatars replaced with LIST<>;
- version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@12369 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/utilities.h')
-rw-r--r-- | protocols/IcqOscarJ/src/utilities.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/protocols/IcqOscarJ/src/utilities.h b/protocols/IcqOscarJ/src/utilities.h index ce1763039c..8b12897596 100644 --- a/protocols/IcqOscarJ/src/utilities.h +++ b/protocols/IcqOscarJ/src/utilities.h @@ -95,51 +95,10 @@ void* __fastcall SAFE_REALLOC(void* p, size_t size); __inline static void SAFE_FREE(char** str) { SAFE_FREE((void**)str); }
__inline static void SAFE_FREE(WCHAR** str) { SAFE_FREE((void**)str); }
-struct lockable_struct: public MZeroedObject
-{
-private:
- int nLockCount;
-public:
- lockable_struct() { _Lock(); };
- virtual ~lockable_struct() {};
-
- void _Lock() { nLockCount++; };
- void _Release() { nLockCount--; if (!nLockCount) delete this; };
-
- int getLockCount() { return nLockCount; };
-};
-
void __fastcall SAFE_DELETE(MZeroedObject **p);
-void __fastcall SAFE_DELETE(lockable_struct **p);
DWORD ICQWaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds, int bWaitAlways = FALSE);
-
-struct icq_critical_section: public lockable_struct
-{
-private:
- HANDLE hMutex;
-
-public:
- icq_critical_section() { hMutex = CreateMutex(NULL, FALSE, NULL); }
- ~icq_critical_section() { CloseHandle(hMutex); }
-
- void Enter(void) { ICQWaitForSingleObject(hMutex, INFINITE, TRUE); }
- void Leave(void) { ReleaseMutex(hMutex); }
-};
-
-__inline static void SAFE_DELETE(icq_critical_section **p) { SAFE_DELETE((lockable_struct**)p); }
-
-struct icq_lock
-{
-private:
- icq_critical_section *pMutex;
-public:
- icq_lock(icq_critical_section *mutex) { pMutex = mutex; pMutex->Enter(); };
- ~icq_lock() { pMutex->Leave(); pMutex = NULL; };
-};
-
-
HANDLE NetLib_OpenConnection(HANDLE hUser, const char* szIdent, NETLIBOPENCONNECTION* nloc);
void NetLib_CloseConnection(HANDLE *hConnection, int bServerConn);
void NetLib_SafeCloseHandle(HANDLE *hConnection);
|