Fixed build error introduced by test upgrade without code upgrade.
Change-Id: If0dc93c9013ccd1898fb1ec7eb34b355772d6b82
diff --git a/aos/common/condition.h b/aos/common/condition.h
index c913b47..ef51b89 100644
--- a/aos/common/condition.h
+++ b/aos/common/condition.h
@@ -54,7 +54,8 @@
// and will be locked when this method returns.
// NOTE: The relocking of the mutex is not performed atomically with waking
// up.
- void Wait();
+ // Returns false.
+ bool Wait();
// Signals at most 1 other process currently Wait()ing on this condition
// variable. Calling this does not require the mutex associated with this
diff --git a/aos/common/mutex.h b/aos/common/mutex.h
index ff953e4..251eb3c 100644
--- a/aos/common/mutex.h
+++ b/aos/common/mutex.h
@@ -28,7 +28,8 @@
~Mutex();
#endif
// Locks the mutex. If it fails, it calls LOG(FATAL).
- void Lock();
+ // Returns false.
+ bool Lock();
// Unlocks the mutex. Fails like Lock.
// Multiple unlocking is undefined.
void Unlock();
diff --git a/aos/linux_code/ipc_lib/condition.cc b/aos/linux_code/ipc_lib/condition.cc
index 0ba4145..ed488c5 100644
--- a/aos/linux_code/ipc_lib/condition.cc
+++ b/aos/linux_code/ipc_lib/condition.cc
@@ -11,8 +11,9 @@
Condition::Condition(Mutex *m) : impl_(), m_(m) {}
-void Condition::Wait() {
+bool Condition::Wait() {
condition_wait(&impl_, &m_->impl_);
+ return false;
}
void Condition::Signal() {
diff --git a/aos/linux_code/ipc_lib/mutex.cpp b/aos/linux_code/ipc_lib/mutex.cpp
index 8c98204..4bd0759 100644
--- a/aos/linux_code/ipc_lib/mutex.cpp
+++ b/aos/linux_code/ipc_lib/mutex.cpp
@@ -17,9 +17,11 @@
// Lock and Unlock use the return values of mutex_lock/mutex_unlock
// to determine whether the lock/unlock succeeded.
-void Mutex::Lock() {
+bool Mutex::Lock() {
if (mutex_grab(&impl_) != 0) {
PLOG(FATAL, "mutex_grab(%p(=%" PRIu32 ")) failed", &impl_, impl_);
+ } else {
+ return false;
}
}