Ignore:
Timestamp:
2011-10-14T14:37:32Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7b54b99
Parents:
e5024111
Message:

usbhid: kbd store pointer to created function.

Make repeat mutex part of the kbd structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/kbd/kbdrepeat.c

    re5024111 rcddd151  
    8585                }
    8686               
    87                 fibril_mutex_lock(kbd->repeat_mtx);
     87                fibril_mutex_lock(&kbd->repeat_mtx);
    8888
    8989                if (kbd->repeat.key_new > 0) {
     
    109109                        delay = CHECK_DELAY;
    110110                }
    111                 fibril_mutex_unlock(kbd->repeat_mtx);
     111                fibril_mutex_unlock(&kbd->repeat_mtx);
    112112               
    113113                async_usleep(delay);
     
    156156void usb_kbd_repeat_start(usb_kbd_t *kbd, unsigned int key)
    157157{
    158         fibril_mutex_lock(kbd->repeat_mtx);
     158        fibril_mutex_lock(&kbd->repeat_mtx);
    159159        kbd->repeat.key_new = key;
    160         fibril_mutex_unlock(kbd->repeat_mtx);
     160        fibril_mutex_unlock(&kbd->repeat_mtx);
    161161}
    162162
     
    174174void usb_kbd_repeat_stop(usb_kbd_t *kbd, unsigned int key)
    175175{
    176         fibril_mutex_lock(kbd->repeat_mtx);
     176        fibril_mutex_lock(&kbd->repeat_mtx);
    177177        if (key == kbd->repeat.key_new) {
    178178                kbd->repeat.key_new = 0;
    179179        }
    180         fibril_mutex_unlock(kbd->repeat_mtx);
     180        fibril_mutex_unlock(&kbd->repeat_mtx);
    181181}
    182182
Note: See TracChangeset for help on using the changeset viewer.