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

Side by Side Diff: runtime/vm/thread_android.cc

Issue 480343003: - Address review comments from https://codereview.chromium.org/474913004/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/thread_pool_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_ANDROID) 6 #if defined(TARGET_OS_ANDROID)
7 7
8 #include "vm/thread.h" 8 #include "vm/thread.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 result = pthread_mutex_init(data_.mutex(), &attr); 190 result = pthread_mutex_init(data_.mutex(), &attr);
191 // Verify that creating a pthread_mutex succeeded. 191 // Verify that creating a pthread_mutex succeeded.
192 VALIDATE_PTHREAD_RESULT(result); 192 VALIDATE_PTHREAD_RESULT(result);
193 193
194 result = pthread_mutexattr_destroy(&attr); 194 result = pthread_mutexattr_destroy(&attr);
195 VALIDATE_PTHREAD_RESULT(result); 195 VALIDATE_PTHREAD_RESULT(result);
196 196
197 // When running with assertions enabled we do track the owner. 197 // When running with assertions enabled we do track the owner.
198 #if defined(DEBUG) 198 #if defined(DEBUG)
199 ASSERT(owner_ == Isolate::Current());
200 owner_ = NULL; 199 owner_ = NULL;
201 #endif // defined(DEBUG) 200 #endif // defined(DEBUG)
202 } 201 }
203 202
204 203
205 Mutex::~Mutex() { 204 Mutex::~Mutex() {
206 int result = pthread_mutex_destroy(data_.mutex()); 205 int result = pthread_mutex_destroy(data_.mutex());
207 // Verify that the pthread_mutex was destroyed. 206 // Verify that the pthread_mutex was destroyed.
208 VALIDATE_PTHREAD_RESULT(result); 207 VALIDATE_PTHREAD_RESULT(result);
209 208
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 338
340 void Monitor::NotifyAll() { 339 void Monitor::NotifyAll() {
341 // TODO(iposva): Do we need to track lock owners? 340 // TODO(iposva): Do we need to track lock owners?
342 int result = pthread_cond_broadcast(data_.cond()); 341 int result = pthread_cond_broadcast(data_.cond());
343 VALIDATE_PTHREAD_RESULT(result); 342 VALIDATE_PTHREAD_RESULT(result);
344 } 343 }
345 344
346 } // namespace dart 345 } // namespace dart
347 346
348 #endif // defined(TARGET_OS_ANDROID) 347 #endif // defined(TARGET_OS_ANDROID)
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/thread_pool_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698