Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Unified Diff: runtime/vm/freelist.cc

Issue 999983004: simMutex (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/os_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/freelist.cc
===================================================================
--- runtime/vm/freelist.cc (revision 44732)
+++ runtime/vm/freelist.cc (working copy)
@@ -70,7 +70,7 @@
uword FreeList::TryAllocateLocked(intptr_t size, bool is_protected) {
- DEBUG_ASSERT(mutex_->Owner() == Isolate::Current());
+ DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread());
// Precondition: is_protected is false or else all free list elements are
// in non-writable pages.
@@ -183,7 +183,7 @@
void FreeList::FreeLocked(uword addr, intptr_t size) {
- DEBUG_ASSERT(mutex_->Owner() == Isolate::Current());
+ DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread());
// Precondition required by AsElement and EnqueueElement: the (page
// containing the) header of the freed block should be writable. This is
// the case when called for newly allocated pages because they are
@@ -249,7 +249,7 @@
intptr_t FreeList::LengthLocked(int index) const {
- DEBUG_ASSERT(mutex_->Owner() == Isolate::Current());
+ DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread());
ASSERT(index >= 0);
ASSERT(index < kNumLists);
intptr_t result = 0;
@@ -362,7 +362,7 @@
FreeListElement* FreeList::TryAllocateLargeLocked(intptr_t minimum_size) {
- DEBUG_ASSERT(mutex_->Owner() == Isolate::Current());
+ DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread());
FreeListElement* previous = NULL;
FreeListElement* current = free_lists_[kNumLists];
// TODO(koda): Find largest.
@@ -384,7 +384,7 @@
uword FreeList::TryAllocateSmallLocked(intptr_t size) {
- DEBUG_ASSERT(mutex_->Owner() == Isolate::Current());
+ DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread());
if (size > last_free_small_size_) {
return 0;
}
« no previous file with comments | « no previous file | runtime/vm/os_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698