mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-13 05:48:40 +00:00
rwlock: Added SDL_rwlock API for shared locks.
This commit is contained in:
@@ -23,9 +23,18 @@
|
||||
#ifndef SDL_mutex_c_h_
|
||||
#define SDL_mutex_c_h_
|
||||
|
||||
#if !(defined(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX) || \
|
||||
defined(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP))
|
||||
#define FAKE_RECURSIVE_MUTEX
|
||||
#endif
|
||||
|
||||
struct SDL_mutex
|
||||
{
|
||||
pthread_mutex_t id;
|
||||
#ifdef FAKE_RECURSIVE_MUTEX
|
||||
int recursive;
|
||||
pthread_t owner;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* SDL_mutex_c_h_ */
|
||||
|
||||
Reference in New Issue
Block a user