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

Side by Side Diff: runtime/vm/isolate_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 <pthread.h> 6 #include <pthread.h>
7 7
8 #include "vm/assert.h" 8 #include "platform/assert.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 #define VALIDATE_PTHREAD_RESULT(result) \ 13 #define VALIDATE_PTHREAD_RESULT(result) \
14 if (result != 0) { \ 14 if (result != 0) { \
15 FATAL2("pthread error: %d (%s)", result, strerror(result)); \ 15 FATAL2("pthread error: %d (%s)", result, strerror(result)); \
16 } 16 }
17 17
18 18
(...skipping 13 matching lines...) Expand all
32 void Isolate::InitOnce() { 32 void Isolate::InitOnce() {
33 ASSERT(isolate_key == PTHREAD_KEY_UNSET); 33 ASSERT(isolate_key == PTHREAD_KEY_UNSET);
34 int result = pthread_key_create(&isolate_key, NULL); 34 int result = pthread_key_create(&isolate_key, NULL);
35 // Make sure creating a key was successful. 35 // Make sure creating a key was successful.
36 VALIDATE_PTHREAD_RESULT(result); 36 VALIDATE_PTHREAD_RESULT(result);
37 ASSERT(isolate_key != PTHREAD_KEY_UNSET); 37 ASSERT(isolate_key != PTHREAD_KEY_UNSET);
38 create_callback_ = NULL; 38 create_callback_ = NULL;
39 } 39 }
40 40
41 } // namespace dart 41 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698