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

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

Issue 1960443003: Fix Windows build (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « runtime/vm/os_thread_android.cc ('k') | no next file » | 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" // NOLINT 5 #include "platform/globals.h" // NOLINT
6 #include "platform/signal_blocker.h" // NOLINT
7 6
8 #if defined(TARGET_OS_LINUX) 7 #if defined(TARGET_OS_LINUX)
9 8
10 #include "vm/os_thread.h" 9 #include "vm/os_thread.h"
11 10
12 #include <errno.h> // NOLINT 11 #include <errno.h> // NOLINT
13 #include <sys/resource.h> // NOLINT 12 #include <sys/resource.h> // NOLINT
14 #include <sys/syscall.h> // NOLINT 13 #include <sys/syscall.h> // NOLINT
15 #include <sys/time.h> // NOLINT 14 #include <sys/time.h> // NOLINT
16 15
17 #include "platform/assert.h" 16 #include "platform/assert.h"
17 #include "platform/signal_blocker.h"
18 #include "platform/utils.h" 18 #include "platform/utils.h"
19 19
20 namespace dart { 20 namespace dart {
21 21
22 #define VALIDATE_PTHREAD_RESULT(result) \ 22 #define VALIDATE_PTHREAD_RESULT(result) \
23 if (result != 0) { \ 23 if (result != 0) { \
24 const int kBufferSize = 1024; \ 24 const int kBufferSize = 1024; \
25 char error_buf[kBufferSize]; \ 25 char error_buf[kBufferSize]; \
26 FATAL2("pthread error: %d (%s)", result, \ 26 FATAL2("pthread error: %d (%s)", result, \
27 Utils::StrError(result, error_buf, kBufferSize)); \ 27 Utils::StrError(result, error_buf, kBufferSize)); \
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 void Monitor::NotifyAll() { 448 void Monitor::NotifyAll() {
449 // When running with assertions enabled we track the owner. 449 // When running with assertions enabled we track the owner.
450 ASSERT(IsOwnedByCurrentThread()); 450 ASSERT(IsOwnedByCurrentThread());
451 int result = pthread_cond_broadcast(data_.cond()); 451 int result = pthread_cond_broadcast(data_.cond());
452 VALIDATE_PTHREAD_RESULT(result); 452 VALIDATE_PTHREAD_RESULT(result);
453 } 453 }
454 454
455 } // namespace dart 455 } // namespace dart
456 456
457 #endif // defined(TARGET_OS_LINUX) 457 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « runtime/vm/os_thread_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698