From: arighi Date: Mon, 22 Mar 2010 11:56:51 +0000 (+0000) Subject: kdb: re-enable calling poor man's scheduler inside kbd_peek(). X-Git-Tag: 2.4.0~10 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=ce53d10edad6c070e6603cf8cd2e8da464dad32c;p=bertos.git kdb: re-enable calling poor man's scheduler inside kbd_peek(). Restore the old behaviour of calling a custom schedule() function (provided by the user) inside kbd_peek() if CONFIG_KBD_SCHED is enabled. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3254 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/frame.h b/bertos/cpu/frame.h index 4d78a3c3..0809b0ec 100644 --- a/bertos/cpu/frame.h +++ b/bertos/cpu/frame.h @@ -212,9 +212,9 @@ #if defined(ARCH_QT) && (ARCH & ARCH_QT) /* This emulator hook should yield the CPU to the host. */ EXTERN_C_BEGIN - void refresh(void); + void schedule(void); EXTERN_C_END - #define CPU_IDLE refresh() + #define CPU_IDLE schedule() #else /* !ARCH_EMUL */ #define CPU_IDLE do { /* nothing */ } while (0) #endif /* !ARCH_EMUL */ diff --git a/bertos/drv/kbd.c b/bertos/drv/kbd.c index 3334deb2..19b2478d 100644 --- a/bertos/drv/kbd.c +++ b/bertos/drv/kbd.c @@ -178,7 +178,7 @@ keymask_t kbd_peek(void) keymask_t key = 0; #if CONFIG_KBD_SCHED - timer_delay(1); + schedule(); #endif /* Extract an event from the keyboard buffer */