Changeset f0450658 in mainline for kernel/arch/ia64/src/ski/ski.c


Ignore:
Timestamp:
2006-10-19T18:07:18Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8cee705
Parents:
3dea17f
Message:

ia64 work.
Move keyboard polling to a dedicated kernel thread.
Console initialization and console related sysinfo setup
can be now done in a single function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/src/ski/ski.c

    r3dea17f rf0450658  
    4343#include <ddi/irq.h>
    4444#include <ipc/irq.h>
     45#include <proc/thread.h>
    4546#include <synch/spinlock.h>
    4647#include <arch/asm.h>
     
    124125
    125126/** Ask keyboard if a key was pressed. */
    126 void poll_keyboard(void)
     127static void poll_keyboard(void)
    127128{
    128129        char ch;
     
    225226        irq_register(&ski_kbd_irq);
    226227
    227 }
    228 
    229 /** Setup console sysinfo (i.e. Keyboard IRQ)
    230  *
    231  * Because sysinfo neads memory allocation/dealocation
    232  * this functions should be called separetely from init.
    233  *
    234  */
    235 void ski_set_console_sysinfo(void)
    236 {
    237228        sysinfo_set_item_val("kbd", NULL, true);
    238229        sysinfo_set_item_val("kbd.inr", NULL, SKI_KBD_INR);
     
    259250}
    260251
     252
     253#define POLL_INTERVAL           50000           /* 50 ms */
     254
     255/** Kernel thread for polling keyboard. */
     256void kkbdpoll(void *arg)
     257{
     258        while (1) {
     259                poll_keyboard();
     260                thread_usleep(POLL_INTERVAL);
     261        }
     262}
     263
    261264/** @}
    262265 */
Note: See TracChangeset for help on using the changeset viewer.