- fix headless server crash due to new call to setgama in headless mode

- a few code optimizations to start to improve performance
This commit is contained in:
Mark Vejvoda
2012-04-16 06:14:10 +00:00
parent f612707849
commit a37dc8a7b3
4 changed files with 100 additions and 57 deletions

View File

@@ -258,13 +258,13 @@ void ReadWriteMutex::UnLockRead() {
void ReadWriteMutex::LockWrite() {
MutexSafeWrapper safeMutex(&mutex);
uint32 totalLocks = maxReaders();
for (int i = 0; i < totalLocks; ++i) {
for(unsigned int i = 0; i < totalLocks; ++i) {
semaphore.waitTillSignalled();
}
}
void ReadWriteMutex::UnLockWrite() {
uint32 totalLocks = maxReaders();
for (int i = 0; i < totalLocks; ++i) {
for(unsigned int i = 0; i < totalLocks; ++i) {
semaphore.signal();
}
}