Add recursive mutexes to threading abstraction
authorVitali Lovich <vlovich@aliph.com>
Thu, 17 Mar 2011 02:43:30 +0000 (19:43 -0700)
committerPeter Stuge <peter@stuge.se>
Sun, 24 Jul 2011 20:29:09 +0000 (22:29 +0200)
commit74282582cc879f091ad1d847411337bc3fa78a2b
treeb90980dff598e1b026c7cd22fc27037ed0419fa8
parent8f1bc0659136faf312dabe8fe67380a798299d33
Add recursive mutexes to threading abstraction

This is necessary for the device close path which needs to attain the
events lock, but which might itself be called while handling an event.
The events lock is necessary to properly clean up transfers which might
still be pointing to the device. References #82.

[stuge: Move usbi_mutex_init_recursive() into threads_posix.c]
[stuge: Must also #define _XOPEN_SOURCE 500 to be able to build]
[pbatard: Un-inline usbi_mutex_init_recursive() to make Cygwin happy]
libusb/Makefile.am
libusb/os/threads_posix.c [new file with mode: 0644]
libusb/os/threads_posix.h
libusb/os/threads_windows.h