From 358125d39c4e0f4ea3c19c699df945ad5d2000b6 Mon Sep 17 00:00:00 2001 From: dchagin Date: Sat, 9 Jan 2016 14:31:03 +0000 Subject: MFC r283369: In preparation for switching linuxulator to the use the native 1:1 threads print the thread id in addition to the pid in debug messages. --- sys/amd64/linux32/linux.h | 6 ++++-- sys/i386/linux/linux.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 39c17c8..5e8b748 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -40,8 +40,10 @@ */ extern u_char linux_debug_map[]; #define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name) -#define ARGS(nm, fmt) "linux(%ld): "#nm"("fmt")\n", (long)td->td_proc->p_pid -#define LMSG(fmt) "linux(%ld): "fmt"\n", (long)td->td_proc->p_pid +#define ARGS(nm, fmt) "linux(%ld/%ld): "#nm"("fmt")\n", \ + (long)td->td_proc->p_pid, (long)td->td_tid +#define LMSG(fmt) "linux(%ld/%ld): "fmt"\n", \ + (long)td->td_proc->p_pid, (long)td->td_tid #define LINUX_DTRACE linuxulator32 #ifdef MALLOC_DECLARE diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 27eff32..6f0ad29 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -40,8 +40,10 @@ */ extern u_char linux_debug_map[]; #define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name) -#define ARGS(nm, fmt) "linux(%ld): "#nm"("fmt")\n", (long)td->td_proc->p_pid -#define LMSG(fmt) "linux(%ld): "fmt"\n", (long)td->td_proc->p_pid +#define ARGS(nm, fmt) "linux(%ld/%ld): "#nm"("fmt")\n", \ + (long)td->td_proc->p_pid, (long)td->td_tid +#define LMSG(fmt) "linux(%ld/%ld): "fmt"\n", \ + (long)td->td_proc->p_pid, (long)td->td_tid #define LINUX_DTRACE linuxulator #ifdef MALLOC_DECLARE -- cgit v1.1