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

Unified Diff: mojo/edk/util/logging_internal.cc

Issue 1426343002: EDK: Move mutex.*, cond_var.*, and thread_annotations.h to //mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: oops Created 5 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 | « mojo/edk/util/logging_internal.h ('k') | mojo/edk/util/mutex.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/util/logging_internal.cc
diff --git a/mojo/edk/util/logging_internal.cc b/mojo/edk/util/logging_internal.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c24e4dcc5bc66da1e19416f92feef299c82795d5
--- /dev/null
+++ b/mojo/edk/util/logging_internal.cc
@@ -0,0 +1,33 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/edk/util/mutex.h"
+
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+namespace mojo {
+namespace util {
+namespace internal {
+
+void DcheckHelper(const char* file, int line, const char* condition_string) {
+ fprintf(stderr, "%s:%d: Check failed: %s\n", file, line, condition_string);
+ abort();
+}
+
+void DcheckWithErrnoHelper(const char* file,
+ int line,
+ const char* fn,
+ int error) {
+ fprintf(stderr, "%s:%d: %s: %s\n", file, line, fn, strerror(error));
+ abort();
+}
+
+} // namespace internal
+} // namespace util
+} // namespace mojo
+
+#endif // !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
« no previous file with comments | « mojo/edk/util/logging_internal.h ('k') | mojo/edk/util/mutex.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698