]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
assert: use ceph namespace
authorSage Weil <sage@newdream.net>
Thu, 8 Apr 2010 16:09:43 +0000 (09:09 -0700)
committerSage Weil <sage@newdream.net>
Thu, 8 Apr 2010 16:09:43 +0000 (09:09 -0700)
src/common/BackTrace.cc
src/common/BackTrace.h
src/common/Mutex.h
src/common/Spinlock.h
src/common/assert.cc
src/include/assert.h

index aca8e004acf3535625dc4aec7fb25d2cb145b7b6..e8a7542d0399aaaa2d68a32abbc78284a12f9851 100644 (file)
@@ -6,6 +6,8 @@
 
 #include "BackTrace.h"
 
+namespace ceph {
+
 void BackTrace::print(std::ostream& out)
 {
   for (size_t i = skip; i < size; i++) {
@@ -51,3 +53,4 @@ void BackTrace::print(std::ostream& out)
   }
 };
 
+}
index e07759fc24d8f2d16dddc041b625b400e4e1de32..71a0cccc86b98599ec63c6aff6f16f58f1283074 100644 (file)
@@ -4,6 +4,8 @@
 #include <execinfo.h>
 #include <stdlib.h>
 
+namespace ceph {
+
 struct BackTrace {
   const static int max = 100;
 
@@ -23,4 +25,6 @@ struct BackTrace {
   void print(std::ostream& out);
 };
 
+}
+
 #endif
index 7a6d67a8b60a964124e9ebddaaf61b60f1cc9c01..7132e2bafbe525608e4dbf49d698e17bfe59208e 100644 (file)
@@ -21,6 +21,7 @@
 
 #define LOCKDEP
 
+using namespace ceph;
 
 class Mutex {
 private:
index 3bd83c49f0822a1c9f62a07930363f731fb36c5c..6fb6fe51bcddd09f6290e9154a9c834579e7fa81 100644 (file)
@@ -18,6 +18,8 @@
 #include <pthread.h>
 #include "include/assert.h"
 
+using namespace ceph;
+
 //#define SPINLOCK_LOCKDEP
 
 #ifdef SPINLOCK_LOCKDEP
index e8fcc7de5f6295301a5704a783b13cbc5d0dd105..5051aa733aab5b11f582befe961712fe8040e166 100644 (file)
@@ -6,6 +6,8 @@
 
 #include "common/tls.h"
 
+namespace ceph {
+
 void __ceph_assert_fail(const char *assertion, const char *file, int line, const char *func)
 {
   BackTrace *bt = new BackTrace(2);
@@ -38,3 +40,5 @@ void __ceph_assert_warn(const char *assertion, const char *file, int line, const
 {
   *_dout << "WARNING: assert(" << assertion << ") at: " << file << ":" << line << ": " << func << "()" << std::endl;
 }
+
+}
index 08f3c1c33f3e1cf97658932c4f047aa83e4533f6..f31db2d3b14f5959e43e653d7a4456cfa726a9b8 100644 (file)
@@ -6,6 +6,8 @@
 
 #ifdef __cplusplus
 
+namespace ceph {
+
 class BackTrace;
 
 struct FailedAssertion {
@@ -72,5 +74,9 @@ extern void __ceph_assert_warn(const char *assertion, const char *file, int line
 #define assert_disk(expr)      assert(expr)
 */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif