projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 2.5.7
[lttng-ust.git]
/
include
/
usterr.h
diff --git
a/include/usterr.h
b/include/usterr.h
index cab65407dca9c0c5740e038008b884d9480ac3d3..dc151b0aae2002504422d705966416fe5868f619 100644
(file)
--- a/
include/usterr.h
+++ b/
include/usterr.h
@@
-22,13
+22,11
@@
#include <string.h>
#include <sys/types.h>
#include <string.h>
#include <sys/types.h>
-#include <sys/syscall.h>
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
-#include <ust/core.h>
-
+#include "lttng/ust-tid.h"
#include "share.h"
enum ust_loglevel {
#include "share.h"
enum ust_loglevel {
@@
-59,12
+57,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(), \
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)
## args, \
__func__); \
} while(0)
-#ifdef UST_DEBUG
+#ifdef
LTTNG_
UST_DEBUG
# define DBG(fmt, args...) ERRMSG(fmt, ## args)
# define DBG_raw(fmt, args...) \
do { \
# define DBG(fmt, args...) ERRMSG(fmt, ## args)
# define DBG_raw(fmt, args...) \
do { \
@@
-88,7
+86,10
@@
static inline int ust_debug(void)
#define ERR(fmt, args...) ERRMSG("Error: " fmt, ## args)
#define BUG(fmt, args...) ERRMSG("BUG: " fmt, ## args)
#define ERR(fmt, args...) ERRMSG("Error: " fmt, ## args)
#define BUG(fmt, args...) ERRMSG("BUG: " fmt, ## args)
-#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE)
+#if !defined(__linux__) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE))
+/*
+ * Version using XSI strerror_r.
+ */
#define PERROR(call, args...)\
do { \
char buf[200] = "Error in strerror_r()"; \
#define PERROR(call, args...)\
do { \
char buf[200] = "Error in strerror_r()"; \
@@
-96,6
+97,9
@@
static inline int ust_debug(void)
ERRMSG("Error: " call ": %s", ## args, buf); \
} while(0);
#else
ERRMSG("Error: " call ": %s", ## args, buf); \
} while(0);
#else
+/*
+ * Version using GNU strerror_r, for linux with appropriate defines.
+ */
#define PERROR(call, args...)\
do { \
char *buf; \
#define PERROR(call, args...)\
do { \
char *buf; \
@@
-107,12
+111,12
@@
static inline int ust_debug(void)
#define BUG_ON(condition) \
do { \
#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 { \
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)
WARN("condition not respected on line %s:%d", __FILE__, __LINE__); \
} while(0)
#define WARN_ON_ONCE(condition) WARN_ON(condition)
This page took
0.025559 seconds
and
4
git commands to generate.