Changeset ccd1a14 in mainline for uspace/srv/kbd/port/ski.c


Ignore:
Timestamp:
2009-04-25T11:54:17Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9701d49
Parents:
ebfabf6
Message:

Stop userspace kbd driver from polling when switching to kcon. Also, fix swapped reversed enabling/disabling of polling in kernel sgcn and ski drivers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/kbd/port/ski.c

    rebfabf6 rccd1a14  
    4343#include <sys/types.h>
    4444#include <thread.h>
     45#include <bool.h>
    4546
    4647#define SKI_GETCHAR             21
     
    5051static void *ski_thread_impl(void *arg);
    5152static int32_t ski_getchar(void);
     53
     54static volatile bool polling_disabled = false;
    5255
    5356/** Initialize Ski port driver. */
     
    6568}
    6669
     70void kbd_port_yield(void)
     71{
     72        polling_disabled = true;
     73}
     74
     75void kbd_port_reclaim(void)
     76{
     77        polling_disabled = false;
     78}
     79
    6780/** Thread to poll Ski for keypresses. */
    6881static void *ski_thread_impl(void *arg)
     
    7285
    7386        while (1) {
    74                 while (1) {
     87                while (polling_disabled == false) {
    7588                        c = ski_getchar();
    7689                        if (c == 0)
Note: See TracChangeset for help on using the changeset viewer.