Rename a status enum member for Mutex::TryLock.
I changed it to kLockFailed, because kUnlocked seemed not to be a
particularly descriptive name.
Change-Id: Ifdb2ecbf0837cc4b6c40036eedd35d609ada747f
diff --git a/aos/common/mutex.h b/aos/common/mutex.h
index b952644..ca35b10 100644
--- a/aos/common/mutex.h
+++ b/aos/common/mutex.h
@@ -20,8 +20,12 @@
// Otherwise, the destructor will LOG(FATAL).
class Mutex {
public:
+ // States that signify the result of TryLock.
enum class State {
- kLocked, kUnlocked
+ // The mutex was acquired successfully.
+ kLocked,
+ // TryLock tried to grab the mutex and failed.
+ kLockFailed
};
// Creates an unlocked mutex.