kdb: re-enable calling poor man's scheduler inside kbd_peek().
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 22 Mar 2010 11:56:51 +0000 (11:56 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 22 Mar 2010 11:56:51 +0000 (11:56 +0000)
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

bertos/cpu/frame.h
bertos/drv/kbd.c

index 4d78a3c37ae5d2d8866cd76efbb10de67589a757..0809b0eca4d86994baaa48706506f3b8ba4aa0fa 100644 (file)
        #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 */
index 3334deb216f280df623f8c48aef2fc8790ad904b..19b2478df313275725165039a4bfb12903176d52 100644 (file)
@@ -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 */