thread/Posix{Mutex,Cond}: disable "constexpr" on Android
Bionic's pthread declarations are non-literal.
This commit is contained in:
parent
6eda79d02d
commit
9b7f492c65
@ -28,7 +28,7 @@ struct notify {
|
|||||||
Cond cond;
|
Cond cond;
|
||||||
bool pending;
|
bool pending;
|
||||||
|
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) && !defined(__BIONIC__)
|
||||||
constexpr
|
constexpr
|
||||||
#endif
|
#endif
|
||||||
notify():pending(false) {}
|
notify():pending(false) {}
|
||||||
|
@ -41,7 +41,10 @@ class PosixCond {
|
|||||||
pthread_cond_t cond;
|
pthread_cond_t cond;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
constexpr PosixCond():cond(PTHREAD_COND_INITIALIZER) {}
|
#ifndef __BIONIC__
|
||||||
|
constexpr
|
||||||
|
#endif
|
||||||
|
PosixCond():cond(PTHREAD_COND_INITIALIZER) {}
|
||||||
|
|
||||||
PosixCond(const PosixCond &other) = delete;
|
PosixCond(const PosixCond &other) = delete;
|
||||||
PosixCond &operator=(const PosixCond &other) = delete;
|
PosixCond &operator=(const PosixCond &other) = delete;
|
||||||
|
@ -41,7 +41,10 @@ class PosixMutex {
|
|||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
constexpr PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
|
#ifndef __BIONIC__
|
||||||
|
constexpr
|
||||||
|
#endif
|
||||||
|
PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
|
||||||
|
|
||||||
PosixMutex(const PosixMutex &other) = delete;
|
PosixMutex(const PosixMutex &other) = delete;
|
||||||
PosixMutex &operator=(const PosixMutex &other) = delete;
|
PosixMutex &operator=(const PosixMutex &other) = delete;
|
||||||
|
Loading…
Reference in New Issue
Block a user