summaryrefslogtreecommitdiffstats
path: root/base/lock.cc
Commit message (Collapse)AuthorAgeFilesLines
* Initial implementation of new AssertAcquired() functionality for Posix.rdsmith@google.com2010-06-161-3/+33
| | | | | | | | | | | | | | | | Hoisted the windows LockImpl funcitonality up into Lock and added material to ConditionVariable to adjust those shadow variables when needed. Also got rid of os_lock() primitive in Lock class by piggybacking on friend decl needed for accessing shadow variables. BUG=44091 TEST=Try bot run on Windows, Linux, Mac. Will land during low traffic time and revert on any problems or perf degradation. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=49648 Review URL: http://codereview.chromium.org/2196001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49926 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 49648 - Initial implementation of new AssertAcquired() functionality ↵rdsmith@google.com2010-06-131-33/+3
| | | | | | | | | | | | | | | | for Posix. Webkit compile failing. BUG=44091 TEST=Try bot run on Windows, Linux, Mac. Will land during low traffic time and revert on any problems or perf degradation. Review URL: http://codereview.chromium.org/2196001 TBR=rdsmith@google.com Review URL: http://codereview.chromium.org/2805001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49649 0039d316-1c4b-4281-b951-d872f2087c98
* Initial implementation of new AssertAcquired() functionality for Posix.rdsmith@google.com2010-06-131-3/+33
| | | | | | | | | | | | | | Hoisted the windows LockImpl funcitonality up into Lock and added material to ConditionVariable to adjust those shadow variables when needed. Also got rid of os_lock() primitive in Lock class by piggybacking on friend decl needed for accessing shadow variables. BUG=44091 TEST=Try bot run on Windows, Linux, Mac. Will land during low traffic time and revert on any problems or perf degradation. Review URL: http://codereview.chromium.org/2196001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49648 0039d316-1c4b-4281-b951-d872f2087c98
* Move windows specific lock-recursion-counter into windows impl filejar@google.com2008-10-211-69/+1
| | | | | | | | | | | | | | | | | | | | Unix implementation of lock leaks the underlying lock_impl_ member so that the condition variable implementation can directly acquire and release the lock (without going through our abstract interface). This causse the recursion counter to become incorrect on such platforms. Windows uses an implementation of condition variables that uses our abstract interface, and hence is the only implementation that can track the recursion count (and besides... windows is the only platform that currently allows recursive (multiple) acquisitions of a lock by a single thread. I'll work on gracefully removing the depricated lock.cc after I've landed this change. r=cpu Review URL: http://codereview.chromium.org/7660 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3703 0039d316-1c4b-4281-b951-d872f2087c98
* Comments out the DCHECK in lock as it causes failures.sky@google.com2008-10-091-1/+3
| | | | | | | | TBR=jar TEST=none Review URL: http://codereview.chromium.org/6604 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3129 0039d316-1c4b-4281-b951-d872f2087c98
* Changes BookmarkModel to not grab the same lock twice.sky@google.com2008-10-091-2/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6391 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3127 0039d316-1c4b-4281-b951-d872f2087c98
* Disallow recursive locking via the Lock classjar@google.com2008-10-091-81/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Some small cleanups to Lock suggested by Gaetano Mendola.deanm@chromium.org2008-10-011-2/+2
| | | | | | Review URL: http://codereview.chromium.org/6037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2754 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Add base to the repository.initial.commit2008-07-261-0/+156
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98