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;
|
||||
bool pending;
|
||||
|
||||
#ifndef WIN32
|
||||
#if !defined(WIN32) && !defined(__BIONIC__)
|
||||
constexpr
|
||||
#endif
|
||||
notify():pending(false) {}
|
||||
|
|
|
@ -41,7 +41,10 @@ class PosixCond {
|
|||
pthread_cond_t cond;
|
||||
|
||||
public:
|
||||
constexpr PosixCond():cond(PTHREAD_COND_INITIALIZER) {}
|
||||
#ifndef __BIONIC__
|
||||
constexpr
|
||||
#endif
|
||||
PosixCond():cond(PTHREAD_COND_INITIALIZER) {}
|
||||
|
||||
PosixCond(const PosixCond &other) = delete;
|
||||
PosixCond &operator=(const PosixCond &other) = delete;
|
||||
|
|
|
@ -41,7 +41,10 @@ class PosixMutex {
|
|||
pthread_mutex_t mutex;
|
||||
|
||||
public:
|
||||
constexpr PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
|
||||
#ifndef __BIONIC__
|
||||
constexpr
|
||||
#endif
|
||||
PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
|
||||
|
||||
PosixMutex(const PosixMutex &other) = delete;
|
||||
PosixMutex &operator=(const PosixMutex &other) = delete;
|
||||
|
|
Loading…
Reference in New Issue