Update unaligned vs aligned ring buffer access comment
[lttng-ust.git] / include / usterr-signal-safe.h
index bbdad0495e8710e53f6ef996eaa23113ba6927c2..6123c0b3a54bed820f36fbc74d93a1fed661646f 100644 (file)
@@ -15,7 +15,6 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <ust-share.h>
-#include "ust-helper.h"
 #include "ust-tid.h"
 #include "ust-snprintf.h"
 
@@ -25,10 +24,11 @@ enum ust_err_loglevel {
        UST_ERR_LOGLEVEL_DEBUG,
 };
 
-LTTNG_HIDDEN
-extern volatile enum ust_err_loglevel ust_err_loglevel;
-LTTNG_HIDDEN
-void ust_err_init(void);
+extern volatile enum ust_err_loglevel ust_err_loglevel
+       __attribute__((visibility("hidden")));
+
+void ust_err_init(void)
+       __attribute__((visibility("hidden")));
 
 #ifdef LTTNG_UST_DEBUG
 static inline bool ust_err_debug_enabled(void)
@@ -100,9 +100,11 @@ do {                                                                       \
 #define PERROR(call, args...)                                          \
        do {                                                            \
                if (ust_err_debug_enabled()) {                          \
-                       char buf[200] = "Error in strerror_r()";        \
-                       strerror_r(errno, buf, sizeof(buf));            \
-                       ERRMSG("Error: " call ": %s", ## args, buf);    \
+                       char perror_buf[200] = "Error in strerror_r()"; \
+                       strerror_r(errno, perror_buf,                   \
+                                       sizeof(perror_buf));            \
+                       ERRMSG("Error: " call ": %s", ## args,          \
+                                       perror_buf);                    \
                }                                                       \
        } while(0)
 #else
@@ -112,10 +114,12 @@ do {                                                                      \
 #define PERROR(call, args...)                                          \
        do {                                                            \
                if (ust_err_debug_enabled()) {                          \
-                       char *buf;                                      \
-                       char tmp[200];                                  \
-                       buf = strerror_r(errno, tmp, sizeof(tmp));      \
-                       ERRMSG("Error: " call ": %s", ## args, buf);    \
+                       char *perror_buf;                               \
+                       char perror_tmp[200];                           \
+                       perror_buf = strerror_r(errno, perror_tmp,      \
+                                       sizeof(perror_tmp));            \
+                       ERRMSG("Error: " call ": %s", ## args,          \
+                                       perror_buf);                    \
                }                                                       \
        } while(0)
 #endif
This page took 0.024686 seconds and 4 git commands to generate.