]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
assert: turn off tls in assert macro
authorSage Weil <sage@newdream.net>
Tue, 28 Apr 2009 19:54:02 +0000 (12:54 -0700)
committerSage Weil <sage@newdream.net>
Tue, 28 Apr 2009 19:54:02 +0000 (12:54 -0700)
About 3% cpu time

src/include/assert.h

index fcf55dbb619a7ef8108d57354099a48801d113d1..c20903216d5dc9002620fcc9cd7ddac811226b9f 100644 (file)
@@ -28,7 +28,7 @@
 extern void __ceph_assert_fail(const char *assertion, const char *file, int line, const char *function)
   __attribute__ ((__noreturn__));
 extern void __ceph_assert_warn(const char *assertion, const char *file, int line, const char *function);
-#if 0
+#if 1
 #define assert(expr)                                                   \
   ((expr)                                                              \
    ? __CEPH_ASSERT_VOID_CAST (0)                                       \
@@ -46,6 +46,7 @@ extern void __ceph_assert_warn(const char *assertion, const char *file, int line
        ? __CEPH_ASSERT_VOID_CAST (0)                                   \
        : __ceph_assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION)); \
   } while (0)
+#endif
 
 #define assert_warn(expr)                                                      \
   ((expr)                                                              \
@@ -54,6 +55,7 @@ extern void __ceph_assert_warn(const char *assertion, const char *file, int line
 
 #define assert_protocol(expr)  assert(expr)
 #define assert_disk(expr)      assert(expr)
-#endif
+
 
 #endif
+