Changeset bf45993 in mainline for uspace/srv/hid/input/input.c


Ignore:
Timestamp:
2014-09-19T10:56:30Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b646dc
Parents:
824208bf (diff), 58f26cb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    r824208bf rbf45993  
    9090static client_t *active_client = NULL;
    9191
     92/** Kernel override */
     93static bool active = true;
     94
    9295/** List of keyboard devices */
    9396static list_t kbd_devs;
     
    295298
    296299/** Arbitrate client actiovation */
    297 static void client_arbitration(client_t *req)
     300static void client_arbitration(void)
    298301{
    299302        /* Mutual exclusion of active clients */
    300303        list_foreach(clients, link, client_t, client)
    301                 client->active = (client == req);
     304                client->active = ((active) && (client == active_client));
    302305       
    303306        /* Notify clients about the arbitration */
     
    347350                        case INPUT_ACTIVATE:
    348351                                active_client = client;
    349                                 client_arbitration(client);
     352                                client_arbitration();
    350353                                async_answer_0(callid, EOK);
    351354                                break;
     
    362365        if (IPC_GET_ARG1(*call)) {
    363366                /* Kernel console activated */
    364                 client_arbitration(NULL);
     367                active = false;
    365368        } else {
    366369                /* Kernel console deactivated */
    367                 client_arbitration(active_client);
    368         }
     370                active = true;
     371        }
     372       
     373        client_arbitration();
    369374}
    370375
Note: See TracChangeset for help on using the changeset viewer.