Compat layer for gettid
[lttng-ust.git] / include / usterr.h
index cab65407dca9c0c5740e038008b884d9480ac3d3..86c9bf866a256dcff7f2b2ae6bf9893381db702a 100644 (file)
@@ -27,8 +27,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 
-#include <ust/core.h>
-
+#include "lttng/ust-tid.h"
 #include "share.h"
 
 enum ust_loglevel {
@@ -59,12 +58,12 @@ static inline int ust_debug(void)
        do {                                                    \
                fprintf(stderr, UST_STR_COMPONENT "[%ld/%ld]: " fmt " (in %s() at " __FILE__ ":" XSTR(__LINE__) ")\n",                          \
                        (long) getpid(),                        \
-                       (long) syscall(SYS_gettid),             \
+                       (long) gettid(),                        \
                        ## args,                                \
                        __func__);                              \
        } while(0)
 
-#ifdef UST_DEBUG
+#ifdef LTTNG_UST_DEBUG
 # define DBG(fmt, args...)             ERRMSG(fmt, ## args)
 # define DBG_raw(fmt, args...)                                 \
        do {                                                    \
@@ -107,12 +106,12 @@ static inline int ust_debug(void)
 
 #define BUG_ON(condition)                                      \
        do {                                                    \
-               if (unlikely(condition))                        \
+               if (caa_unlikely(condition))                    \
                        ERR("condition not respected (BUG) on line %s:%d", __FILE__, __LINE__); \
        } while(0)
 #define WARN_ON(condition)                                     \
        do {                                                    \
-               if (unlikely(condition))                        \
+               if (caa_unlikely(condition))                    \
                        WARN("condition not respected on line %s:%d", __FILE__, __LINE__); \
        } while(0)
 #define WARN_ON_ONCE(condition) WARN_ON(condition)
This page took 0.023721 seconds and 4 git commands to generate.