[syslinux:master] debug: Adding -DDEBUG_THREAD

syslinux-bot for Erwan Velu erwanaliasr1 at gmail.com
Fri Sep 4 09:15:05 PDT 2015


Commit-ID:  74b6a2777e6351edc85aac21a69dd51be5e1e9aa
Gitweb:     http://www.syslinux.org/commit/74b6a2777e6351edc85aac21a69dd51be5e1e9aa
Author:     Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Wed, 19 Aug 2015 07:07:25 +0200
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Fri, 4 Sep 2015 17:57:52 +0200

debug: Adding -DDEBUG_THREAD

When debugging some syslinux code with debugging enabled, the threading
code is so verbose that it completly slow down syslinux but also is so
verbose that any other trace is invisible in the flood.

This commit aims at requesting people to explicitly enable the
threading logs by using -DDEBUG_THREAD.

---
 core/thread/schedule.c | 4 ++++
 mk/devel.mk            | 1 +
 2 files changed, 5 insertions(+)

diff --git a/core/thread/schedule.c b/core/thread/schedule.c
index 5a426f1..31a2840 100644
--- a/core/thread/schedule.c
+++ b/core/thread/schedule.c
@@ -4,6 +4,10 @@
 #include "core.h"
 #include <dprintf.h>
 
+#ifndef DEBUG_THREAD
+#define dprintf
+#endif
+
 void (*sched_hook_func)(void);
 
 /*
diff --git a/mk/devel.mk b/mk/devel.mk
index b1fca87..89642e2 100644
--- a/mk/devel.mk
+++ b/mk/devel.mk
@@ -1,6 +1,7 @@
 # Useful while doing development, but not for production.
 GCCWARN += -Wno-clobbered 
 #GCCWARN += -DDEBUG_MALLOC
+#GCCWARN += -DDEBUG_THREAD
 # GCCWARN += -DDEBUG_PORT=0x3f8 -DCORE_DEBUG=1
 GCCWARN += -DDYNAMIC_DEBUG
 


More information about the Syslinux-commits mailing list