| 46 | } |
| 47 | |
| 48 | bool Mutex::lock(bool block) |
| 49 | { |
| 50 | if(mData == NULL) |
| 51 | return false; |
| 52 | if(block) |
| 53 | { |
| 54 | return SDL_LockMutex(mData->mutex) == 0; |
| 55 | } |
| 56 | else |
| 57 | { |
| 58 | return SDL_TryLockMutex(mData->mutex) == 0; |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | void Mutex::unlock() |
| 63 | { |
no test coverage detected