Issue #1053 - Follow-up: Correct conditional define on POSIX systems.

This conditional was incorrectly changed when removing Android support.
This potentially causes issues on Linux systems by not using pthreads correctly,
which may lead to high idle CPU usage.
This commit is contained in:
Moonchild 2022-06-27 08:02:42 +00:00 committed by roytam1
commit c0f4b97fab

View file

@ -19,8 +19,7 @@ using base::TimeDelta;
ConditionVariable::ConditionVariable(Lock* user_lock)
: user_mutex_(user_lock->lock_impl()->os_lock()) {
int rv = 0;
#if !defined(OS_MACOSX) && \
!(defined(OS_ANDROID) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC))
#if !defined(OS_MACOSX)
pthread_condattr_t attrs;
rv = pthread_condattr_init(&attrs);
DCHECK_EQ(0, rv);