Rename (un)lock_mutex to mutex_(un)lock
For consistency, rename lock_mutex and unlock_mutex to mutex_lock and mutex_unlock.
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
#ifndef LOCKUTIL_H
|
||||
#define LOCKUTIL_H
|
||||
|
||||
static inline void lock_mutex(SDL_mutex *mutex) {
|
||||
#include <stdlib.h>
|
||||
#include <SDL2/SDL_log.h>
|
||||
#include <SDL2/SDL_mutex.h>
|
||||
|
||||
static inline void mutex_lock(SDL_mutex *mutex) {
|
||||
if (SDL_LockMutex(mutex)) {
|
||||
SDL_LogCritical(SDL_LOG_CATEGORY_SYSTEM, "Could not lock mutex");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void unlock_mutex(SDL_mutex *mutex) {
|
||||
static inline void mutex_unlock(SDL_mutex *mutex) {
|
||||
if (SDL_UnlockMutex(mutex)) {
|
||||
SDL_LogCritical(SDL_LOG_CATEGORY_SYSTEM, "Could not unlock mutex");
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user