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

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

Issue 9189003: Move assert.h/assert.cc from runtime/vm to runtime/platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixing vm/assert.h for _macos, _win, _arm and _x64 files Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2011, 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 <errno.h> 5 #include <errno.h>
6 #include <sys/time.h> 6 #include <sys/time.h>
7 7
8 #include "platform/assert.h"
8 #include "vm/thread.h" 9 #include "vm/thread.h"
Ivan Posva 2012/01/13 23:22:06 First.
Søren Gjesse 2012/01/16 08:58:00 Done.
9 10
10 #include "vm/assert.h"
11
12 namespace dart { 11 namespace dart {
13 12
14 #define VALIDATE_PTHREAD_RESULT(result) \ 13 #define VALIDATE_PTHREAD_RESULT(result) \
15 if (result != 0) { \ 14 if (result != 0) { \
16 FATAL2("pthread error: %d (%s)", result, strerror(result)); \ 15 FATAL2("pthread error: %d (%s)", result, strerror(result)); \
17 } 16 }
18 17
19 18
20 static void ComputeTimeSpec(struct timespec* ts, int64_t millis) { 19 static void ComputeTimeSpec(struct timespec* ts, int64_t millis) {
21 int64_t secs = millis / kMillisecondsPerSecond; 20 int64_t secs = millis / kMillisecondsPerSecond;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 240 }
242 241
243 242
244 void Monitor::NotifyAll() { 243 void Monitor::NotifyAll() {
245 // TODO(iposva): Do we need to track lock owners? 244 // TODO(iposva): Do we need to track lock owners?
246 int result = pthread_cond_broadcast(data_.cond()); 245 int result = pthread_cond_broadcast(data_.cond());
247 VALIDATE_PTHREAD_RESULT(result); 246 VALIDATE_PTHREAD_RESULT(result);
248 } 247 }
249 248
250 } // namespace dart 249 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698