diff options
author | Julien Dessaux | 2016-08-17 19:32:19 +0200 |
---|---|---|
committer | Julien Dessaux | 2016-08-17 19:33:51 +0200 |
commit | 1b03e5bfb2317804619057924e7261fd49f68a54 (patch) | |
tree | 19a439a9b266c667566d2387cf83161e88a94abb /src/dbg.h | |
parent | Wrote a proper IRC parser (diff) | |
download | b98-master.tar.gz b98-master.tar.bz2 b98-master.zip |
Diffstat (limited to '')
-rw-r--r-- | src/dbg.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dbg.h b/src/dbg.h new file mode 100644 index 0000000..e8b0d91 --- /dev/null +++ b/src/dbg.h @@ -0,0 +1,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 |