Staging: comedi: Use mutex instead of semaphore in usbdux.c
authorKsenija Stanojevic <ksenija.stanojevic@gmail.com>
Fri, 2 Oct 2015 20:05:57 +0000 (22:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 08:32:56 +0000 (09:32 +0100)
commit1e5cae2f0b3460bf68ebe948bb5caa31c0281c6c
tree87142514b1155a288962d27cd51ab2c058f66245
parent4e719935ea07eae2b9674c9578e8941601e4380d
Staging: comedi: Use mutex instead of semaphore in usbdux.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/usbdux.c
This page took 0.031325 seconds and 5 git commands to generate.