blob: e8b0d9183da602d68e04e506040b940def69c6fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#ifndef _DBG_H_
#define _DBG_H_
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#define DBG(fmt, ...) \
do { \
/*fprintf(stderr, "%s:%d:%lu " fmt "\n", __FILE__, __LINE__, pthread_self(), ##__VA_ARGS__);*/ \
fprintf(stderr, "%s:%d:%lu " fmt "\n", __FILE__, __LINE__, syscall(SYS_gettid), ##__VA_ARGS__); \
} while (0)
#endif
|