rtc::CriticalSection: Add dummy implementation of IsLocked for release builds
In release mode, DCHECK still references the condition before throwing it away, so the function needs to be defined. R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/50779004 Cr-Commit-Position: refs/heads/master@{#9070}
This commit is contained in:
@@ -105,9 +105,13 @@ class LOCKABLE CriticalSection {
|
|||||||
#endif // CS_TRACK_OWNER
|
#endif // CS_TRACK_OWNER
|
||||||
}
|
}
|
||||||
// Use only for DCHECKing.
|
// Use only for DCHECKing.
|
||||||
|
bool IsLocked() {
|
||||||
#if CS_TRACK_OWNER
|
#if CS_TRACK_OWNER
|
||||||
bool IsLocked() { return thread_ != 0; }
|
return thread_ != 0;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
pthread_mutex_t mutex_;
|
pthread_mutex_t mutex_;
|
||||||
|
|||||||
Reference in New Issue
Block a user