- attempt to speed up mutex lock / unlock

This commit is contained in:
SoftCoder
2015-12-28 23:06:12 -08:00
parent ac0c0eafb9
commit c1144ad9d7
2 changed files with 44 additions and 38 deletions

View File

@@ -139,8 +139,14 @@ public:
this->ownerId = ownerId;
}
}
void p();
void v();
inline void p() {
SDL_mutexP(mutex);
refCount++;
}
inline void v() {
refCount--;
SDL_mutexV(mutex);
}
inline int getRefCount() const { return refCount; }
inline SDL_mutex* getMutex() { return mutex; }