From: bernie Date: Sun, 17 Aug 2008 18:32:46 +0000 (+0000) Subject: kdebug: Switched to write() for output because it's reentrant) X-Git-Tag: 2.0.0~278 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=8377d58bc11966e5fed6b8996e3b1429aa0e471e;p=bertos.git 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 --- 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 */