Disallow recursive locking via the Lock class

Change contract so that Posix locks (which deadlock on
attempts by a single thread to acquire a mutex recursively)
and windows critical sections can both be used to implement
the Lock() cass, by disallowing recursive locking.


In DEBUG mode only, we watch for (now) illegal use of
recursive locking.

Also remove a pile of cruft that has built up in this file
as various folks have re-re-refactored and moved around
code.

Note that Window's condition variable implementation still
uses the AutoUnlock() helper class, but now the 
implementation (sans nested locking) is very trivial.  
Posix will probably use their own CV implementation.


r=mbelshe
Review URL: http://codereview.chromium.org/5630

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3105 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 81898f7b205b792c028ada5f506c22c2b31e76ab
2 files changed
tree: 2ff41164740bef62c2016044d18b8279c7da9130
  1. base/
  2. build/