diff options
| author | David Bremner <david@tethera.net> | 2018-09-03 11:00:26 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2018-09-06 08:07:12 -0300 |
| commit | 040fd630bf74eb8be75633bf3cbdb0c38d0f16f2 (patch) | |
| tree | eb3faa696be1ad1257cccbfeeb8967169b6a94fb /lib/thread.cc | |
| parent | d0b844b358f7bb7bc7c6f152223577efcebfc89b (diff) | |
lib/thread: add macro for debug printing of threading
This is analogous to DEBUG_DATABASE_SANITY, and is intended to help
debugging and to help users submit bug reports.
Diffstat (limited to 'lib/thread.cc')
| -rw-r--r-- | lib/thread.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/thread.cc b/lib/thread.cc index b599a97d..6d15c49b 100644 --- a/lib/thread.cc +++ b/lib/thread.cc @@ -24,6 +24,12 @@ #include <gmime/gmime.h> #include <glib.h> /* GHashTable */ +#ifdef DEBUG_THREADING +#define THREAD_DEBUG(format, ...) fprintf(stderr, format " (%s).\n", ##__VA_ARGS__, __location__) +#else +#define THREAD_DEBUG(format, ...) do {} while (0) /* ignored */ +#endif + #define EMPTY_STRING(s) ((s)[0] == '\0') struct _notmuch_thread { |
