Revert 8260 "Base RWLockWrapper on rtc::SharedExclusiveLock."
Unfortunately this caused channel teardown to hang.
More details in email(s).
> Base RWLockWrapper on rtc::SharedExclusiveLock.
>
> Also moves rtc::Event and rtc::SharedExclusiveLock to rtc_base_approved.
>
> R=tommi@webrtc.org
> BUG=
>
> Review URL: https://webrtc-codereview.appspot.com/38889004
TBR=pbos@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/34999005
Cr-Commit-Position: refs/heads/master@{#8284}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8284 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/system_wrappers/interface/rw_lock_wrapper.h b/webrtc/system_wrappers/interface/rw_lock_wrapper.h
index 94c2c97..dbe6d6c 100644
--- a/webrtc/system_wrappers/interface/rw_lock_wrapper.h
+++ b/webrtc/system_wrappers/interface/rw_lock_wrapper.h
@@ -13,6 +13,10 @@
#include "webrtc/base/thread_annotations.h"
+// Note, Windows pre-Vista version of RW locks are not supported natively. For
+// these OSs regular critical sections have been used to approximate RW lock
+// functionality and will therefore have worse performance.
+
namespace webrtc {
class LOCKABLE RWLockWrapper {
@@ -27,6 +31,8 @@
virtual void ReleaseLockShared() UNLOCK_FUNCTION() = 0;
};
+// RAII extensions of the RW lock. Prevents Acquire/Release missmatches and
+// provides more compact locking syntax.
class SCOPED_LOCKABLE ReadLockScoped {
public:
ReadLockScoped(RWLockWrapper& rw_lock) SHARED_LOCK_FUNCTION(rw_lock)