Add spinlock shim for Android NDK builds
Fixes compiler errors on missing spinlock when building with Android NDK.
This commit is contained in:
1 parent
5b5a3496e1
commit
f5925c766e
1 file changed
+18
@@ -30,6 +30,24 @@
|
|||||||
# include "pthread_spin_lock_shim.h" // spinlock shim for OSX ..
|
# include "pthread_spin_lock_shim.h" // spinlock shim for OSX ..
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __ANDROID__
|
||||||
|
//Spinlock patch for building with Android NDK
|
||||||
|
|
||||||
|
typedef pthread_mutex_t pthread_spinlock_t;
|
||||||
|
|
||||||
|
#define pthread_spin_init(lock, pshared) \
|
||||||
|
pthread_mutex_init(lock, NULL)
|
||||||
|
|
||||||
|
#define pthread_spin_lock(lock) \
|
||||||
|
pthread_mutex_lock(lock)
|
||||||
|
|
||||||
|
#define pthread_spin_unlock(lock) \
|
||||||
|
pthread_mutex_unlock(lock)
|
||||||
|
|
||||||
|
#define pthread_spin_destroy(lock) \
|
||||||
|
pthread_mutex_destroy(lock)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAX_PM3_INPUT_ARGS_LENGTH 4096
|
#define MAX_PM3_INPUT_ARGS_LENGTH 4096
|
||||||
|
|
||||||
bool AlwaysAvailable(void) {
|
bool AlwaysAvailable(void) {
|
||||||
|
|||||||
Reference in new issue
Block a user