]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: comedi: Use mutex instead of semaphore in usbduxsigma.c
authorKsenija Stanojevic <ksenija.stanojevic@gmail.com>
Fri, 2 Oct 2015 20:04:22 +0000 (22:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 08:32:56 +0000 (09:32 +0100)
commitd1292ccd96b4258b68d0ec4f269dd3bccbeab42c
treee9bcedd2c63cbadd1d744c056789b4f5b065d0c3
parent6e4edbe2240f840b489243226a8acbcc6561ba95
Staging: comedi: Use mutex instead of semaphore in usbduxsigma.c

Replace binary semaphore with mutex because mutex gives better
performance.
This change is safe because the thread that decrements the value of semaphore
is also the one that increments it, and acts like a mutex where owner of the
lock is the only one that can release the lock.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/usbduxsigma.c