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

Unified Diff: runtime/vm/os_thread_macos.cc

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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 | « runtime/vm/os_thread_linux.cc ('k') | runtime/vm/os_thread_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_thread_macos.cc
diff --git a/runtime/vm/os_thread_macos.cc b/runtime/vm/os_thread_macos.cc
index 92d04147d65a215a583f2e18c62ba554f5e98858..ec0959bcc6174e4b9469391866507ebb20935763 100644
--- a/runtime/vm/os_thread_macos.cc
+++ b/runtime/vm/os_thread_macos.cc
@@ -7,16 +7,16 @@
#include "vm/os_thread.h"
-#include <sys/errno.h> // NOLINT
-#include <sys/types.h> // NOLINT
-#include <sys/sysctl.h> // NOLINT
-#include <mach/mach_init.h> // NOLINT
-#include <mach/mach_host.h> // NOLINT
-#include <mach/mach_port.h> // NOLINT
-#include <mach/mach_traps.h> // NOLINT
-#include <mach/task_info.h> // NOLINT
+#include <sys/errno.h> // NOLINT
+#include <sys/types.h> // NOLINT
+#include <sys/sysctl.h> // NOLINT
+#include <mach/mach_init.h> // NOLINT
+#include <mach/mach_host.h> // NOLINT
+#include <mach/mach_port.h> // NOLINT
+#include <mach/mach_traps.h> // NOLINT
+#include <mach/task_info.h> // NOLINT
#include <mach/thread_info.h> // NOLINT
-#include <mach/thread_act.h> // NOLINT
+#include <mach/thread_act.h> // NOLINT
#include "platform/assert.h"
#include "platform/utils.h"
@@ -25,13 +25,13 @@
namespace dart {
-#define VALIDATE_PTHREAD_RESULT(result) \
- if (result != 0) { \
- const int kBufferSize = 1024; \
- char error_message[kBufferSize]; \
- NOT_IN_PRODUCT(Profiler::DumpStackTrace(true /* native_stack_trace */)); \
- Utils::StrError(result, error_message, kBufferSize); \
- FATAL2("pthread error: %d (%s)", result, error_message); \
+#define VALIDATE_PTHREAD_RESULT(result) \
+ if (result != 0) { \
+ const int kBufferSize = 1024; \
+ char error_message[kBufferSize]; \
+ NOT_IN_PRODUCT(Profiler::DumpStackTrace(true /* native_stack_trace */)); \
+ Utils::StrError(result, error_message, kBufferSize); \
+ FATAL2("pthread error: %d (%s)", result, error_message); \
}
@@ -44,17 +44,17 @@ namespace dart {
#ifdef DEBUG
-#define RETURN_ON_PTHREAD_FAILURE(result) \
- if (result != 0) { \
- const int kBufferSize = 1024; \
- char error_message[kBufferSize]; \
- Utils::StrError(result, error_message, kBufferSize); \
- fprintf(stderr, "%s:%d: pthread error: %d (%s)\n", \
- __FILE__, __LINE__, result, error_message); \
- return result; \
+#define RETURN_ON_PTHREAD_FAILURE(result) \
+ if (result != 0) { \
+ const int kBufferSize = 1024; \
+ char error_message[kBufferSize]; \
+ Utils::StrError(result, error_message, kBufferSize); \
+ fprintf(stderr, "%s:%d: pthread error: %d (%s)\n", __FILE__, __LINE__, \
+ result, error_message); \
+ return result; \
}
#else
-#define RETURN_ON_PTHREAD_FAILURE(result) \
+#define RETURN_ON_PTHREAD_FAILURE(result) \
if (result != 0) return result;
#endif
@@ -394,9 +394,8 @@ Monitor::WaitResult Monitor::WaitMicros(int64_t micros) {
(micros - (secs * kMicrosecondsPerSecond)) * kNanosecondsPerMicrosecond;
ts.tv_sec = static_cast<int32_t>(secs);
ts.tv_nsec = static_cast<long>(nanos); // NOLINT (long used in timespec).
- int result = pthread_cond_timedwait_relative_np(data_.cond(),
- data_.mutex(),
- &ts);
+ int result =
+ pthread_cond_timedwait_relative_np(data_.cond(), data_.mutex(), &ts);
ASSERT((result == 0) || (result == ETIMEDOUT));
if (result == ETIMEDOUT) {
retval = kTimedOut;
« no previous file with comments | « runtime/vm/os_thread_linux.cc ('k') | runtime/vm/os_thread_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698