From 8377d58bc11966e5fed6b8996e3b1429aa0e471e Mon Sep 17 00:00:00 2001 From: bernie Date: Sun, 17 Aug 2008 18:32:46 +0000 Subject: [PATCH] kdebug: Switched to write() for output because it's reentrant) git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1656 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/drv/kdebug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bertos/drv/kdebug.c b/bertos/drv/kdebug.c index 1f872550..d929bbbf 100644 --- a/bertos/drv/kdebug.c +++ b/bertos/drv/kdebug.c @@ -58,9 +58,10 @@ #if OS_HOSTED - #include + #include // write() + #define KDBG_WAIT_READY() do { /*nop*/ } while(0) - #define KDBG_WRITE_CHAR(c) do { char __c = (c); write(2, &__c, sizeof(__c)); } while(0) + #define KDBG_WRITE_CHAR(c) do { char __c = (c); write(STDERR_FILENO, &__c, sizeof(__c)); } while(0) #define KDBG_MASK_IRQ(old) do { (void)(old); } while(0) #define KDBG_RESTORE_IRQ(old) do { /*nop*/ } while(0) typedef char kdbg_irqsave_t; /* unused */ -- 2.25.1