rwlock: Added SDL_rwlock API for shared locks.

This commit is contained in:
Ryan C. Gordon
2023-04-24 01:07:59 -04:00
parent 776820526b
commit e474047ff8
31 changed files with 1244 additions and 20 deletions

View File

@@ -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_ */