Changeset 593e023 in mainline for uspace/srv/hid/input/port/niagara.c


Ignore:
Timestamp:
2014-08-12T17:14:32Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c3bdc92
Parents:
ce3efa0
Message:

allow compositor and console to coexist side-by-side, use the input server as a poor man's seat arbitrator

  • kernel console notifies both about the release and grab events
  • input server arbitrates the seat selection between kernel console and any number of user space UIs (currently the console server and the compositor server)
  • input port yield and reclaim methods have been removed (they are used only on Ski and Niagara, both already need a more generic mechanism for the kernel/user space cooperation)
  • console and compositor server keep track of the kernel console via the input arbitration
  • move the waiting for a character device from init and terminal widget to getterm
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/port/niagara.c

    rce3efa0 r593e023  
    4848
    4949static int niagara_port_init(kbd_dev_t *);
    50 static void niagara_port_yield(void);
    51 static void niagara_port_reclaim(void);
    5250static void niagara_port_write(uint8_t data);
    5351
    5452kbd_port_ops_t niagara_port = {
    5553        .init = niagara_port_init,
    56         .yield = niagara_port_yield,
    57         .reclaim = niagara_port_reclaim,
    5854        .write = niagara_port_write
    5955};
     
    7975static input_buffer_t input_buffer = (input_buffer_t) AS_AREA_ANY;
    8076
    81 static volatile bool polling_disabled = false;
    8277static void niagara_thread_impl(void *arg);
    8378
     
    108103       
    109104        return 0;
    110 }
    111 
    112 static void niagara_port_yield(void)
    113 {
    114         polling_disabled = true;
    115 }
    116 
    117 static void niagara_port_reclaim(void)
    118 {
    119         polling_disabled = false;
    120105}
    121106
     
    149134
    150135        while (1) {
    151                 if (polling_disabled == false)
    152                         niagara_key_pressed();
     136                niagara_key_pressed();
    153137                usleep(POLL_INTERVAL);
    154138        }
Note: See TracChangeset for help on using the changeset viewer.