summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-04-08 18:09:43 +0200
committerSage Weil <sage@newdream.net>2010-04-08 18:09:43 +0200
commitdf2422f3647b4ca53653305b9352a6d1f81eeda1 (patch)
treed38148812f2a2fa8ccfec6e94d8a2cb3cc39444b /src/common
parentcrc32c: prefix with ceph_ (diff)
downloadceph-df2422f3647b4ca53653305b9352a6d1f81eeda1.tar.xz
ceph-df2422f3647b4ca53653305b9352a6d1f81eeda1.zip
assert: use ceph namespace
Diffstat (limited to 'src/common')
-rw-r--r--src/common/BackTrace.cc3
-rw-r--r--src/common/BackTrace.h4
-rw-r--r--src/common/Mutex.h1
-rw-r--r--src/common/Spinlock.h2
-rw-r--r--src/common/assert.cc4
5 files changed, 14 insertions, 0 deletions
diff --git a/src/common/BackTrace.cc b/src/common/BackTrace.cc
index aca8e004acf..e8a7542d039 100644
--- a/src/common/BackTrace.cc
+++ b/src/common/BackTrace.cc
@@ -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)
}
};
+}
diff --git a/src/common/BackTrace.h b/src/common/BackTrace.h
index e07759fc24d..71a0cccc86b 100644
--- a/src/common/BackTrace.h
+++ b/src/common/BackTrace.h
@@ -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
diff --git a/src/common/Mutex.h b/src/common/Mutex.h
index 7a6d67a8b60..7132e2bafbe 100644
--- a/src/common/Mutex.h
+++ b/src/common/Mutex.h
@@ -21,6 +21,7 @@
#define LOCKDEP
+using namespace ceph;
class Mutex {
private:
diff --git a/src/common/Spinlock.h b/src/common/Spinlock.h
index 3bd83c49f08..6fb6fe51bcd 100644
--- a/src/common/Spinlock.h
+++ b/src/common/Spinlock.h
@@ -18,6 +18,8 @@
#include <pthread.h>
#include "include/assert.h"
+using namespace ceph;
+
//#define SPINLOCK_LOCKDEP
#ifdef SPINLOCK_LOCKDEP
diff --git a/src/common/assert.cc b/src/common/assert.cc
index e8fcc7de5f6..5051aa733aa 100644
--- a/src/common/assert.cc
+++ b/src/common/assert.cc
@@ -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;
}
+
+}