Changeset f0450658 in mainline
- Timestamp:
- 2006-10-19T18:07:18Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8cee705
- Parents:
- 3dea17f
- Location:
- kernel/arch/ia64
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/include/ski/ski.h
r3dea17f rf0450658 46 46 47 47 extern void ski_init_console(void); 48 extern void ski_set_console_sysinfo(void);49 extern void poll_keyboard(void);50 48 51 49 extern void ski_kbd_grab(void); 52 50 extern void ski_kbd_release(void); 51 52 extern void kkbdpoll(void *arg); 53 53 54 54 #endif -
kernel/arch/ia64/src/drivers/it.c
r3dea17f rf0450658 36 36 37 37 #include <arch/drivers/it.h> 38 #include <arch/ski/ski.h>39 38 #include <arch/interrupt.h> 40 39 #include <arch/register.h> … … 117 116 118 117 clock(); 119 120 /*121 * This one is a good candidate for moving to a separate122 * kernel thread private to ski.c123 */124 poll_keyboard();125 118 } 126 119 -
kernel/arch/ia64/src/ia64.c
r3dea17f rf0450658 87 87 ski_init_console(); 88 88 it_init(); 89 ski_set_console_sysinfo();90 89 } 91 90 … … 100 99 void arch_post_smp_init(void) 101 100 { 101 thread_t *t; 102 103 if (config.cpu_active == 1) { 104 /* 105 * Create thread that polls keyboard. 106 */ 107 t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll"); 108 if (!t) 109 panic("cannot create kkbdpoll\n"); 110 thread_ready(t); 111 } 102 112 } 103 113 -
kernel/arch/ia64/src/ski/ski.c
r3dea17f rf0450658 43 43 #include <ddi/irq.h> 44 44 #include <ipc/irq.h> 45 #include <proc/thread.h> 45 46 #include <synch/spinlock.h> 46 47 #include <arch/asm.h> … … 124 125 125 126 /** Ask keyboard if a key was pressed. */ 126 void poll_keyboard(void)127 static void poll_keyboard(void) 127 128 { 128 129 char ch; … … 225 226 irq_register(&ski_kbd_irq); 226 227 227 }228 229 /** Setup console sysinfo (i.e. Keyboard IRQ)230 *231 * Because sysinfo neads memory allocation/dealocation232 * this functions should be called separetely from init.233 *234 */235 void ski_set_console_sysinfo(void)236 {237 228 sysinfo_set_item_val("kbd", NULL, true); 238 229 sysinfo_set_item_val("kbd.inr", NULL, SKI_KBD_INR); … … 259 250 } 260 251 252 253 #define POLL_INTERVAL 50000 /* 50 ms */ 254 255 /** Kernel thread for polling keyboard. */ 256 void kkbdpoll(void *arg) 257 { 258 while (1) { 259 poll_keyboard(); 260 thread_usleep(POLL_INTERVAL); 261 } 262 } 263 261 264 /** @} 262 265 */
Note:
See TracChangeset
for help on using the changeset viewer.