Darwin: Fix libusb_init() and libusb_exit() refcount race condition
authorSean McBride <sean@rogue-research.com>
Fri, 9 Dec 2011 18:37:22 +0000 (13:37 -0500)
committerPeter Stuge <peter@stuge.se>
Wed, 8 Feb 2012 14:11:11 +0000 (15:11 +0100)
commit952a9bb6116afc69c4bae4714c2eb0713bf62a6d
tree458fbc25f6d705df3a4c0be28ca666984e50f77c
parent721cc1c19fc8e88c4482ab3d1e8a34fa100c403c
Darwin: Fix libusb_init() and libusb_exit() refcount race condition

Use OSAtomicIncrement32Barrier() and OSAtomicDecrement32Barrier()
in darwin_init() and darwin_exit() to be thread safe.
libusb/os/darwin_usb.c