From 9a9613b6eeec4ec0d8ac6dc43cc6797ec0e4aa6f Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 17 Jun 2013 11:30:04 +1000 Subject: [PATCH] We should be setting cancelstate, not canceltype when disabling it for usb locking. --- usbutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usbutils.c b/usbutils.c index eeec6aae..da82e1dd 100644 --- a/usbutils.c +++ b/usbutils.c @@ -1465,13 +1465,13 @@ struct cgpu_info *usb_free_cgpu_devlock(struct cgpu_info *cgpu, bool free_devloc * the thread Cancelability unrestored */ #define DEVLOCK(cgpu, _pth_state) do { \ - pthread_setcanceltype(PTHREAD_CANCEL_DISABLE, &_pth_state); \ + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &_pth_state); \ wr_lock(cgpu->usbinfo.devlock); \ } while (0) #define DEVUNLOCK(cgpu, _pth_state) do { \ wr_unlock(cgpu->usbinfo.devlock); \ - pthread_setcanceltype(_pth_state, NULL); \ + pthread_setcancelstate(_pth_state, NULL); \ } while (0) static int _usb_init(struct cgpu_info *cgpu, struct libusb_device *dev, struct usb_find_devices *found)