We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7a9563 commit ed166f5Copy full SHA for ed166f5
storage/innobase/os/os0event.cc
@@ -126,7 +126,10 @@ struct os_event {
126
/** @return true if the event is in the signalled state. */
127
bool is_set() const UNIV_NOTHROW
128
{
129
- return(m_set);
+ mutex.enter();
130
+ bool is_set = m_set;
131
+ mutex.exit();
132
+ return is_set;
133
}
134
135
private:
@@ -224,7 +227,7 @@ struct os_event {
224
227
int64_t signal_count; /*!< this is incremented
225
228
each time the event becomes
226
229
signaled */
- EventMutex mutex; /*!< this mutex protects
230
+ mutable EventMutex mutex; /*!< this mutex protects
231
the next fields */
232
233
0 commit comments