Commit 2eb6d35795052fb5036540181426b6d95ecd085b

Con Kolivas 2013-06-17T10:30:00

Pthread cancel state should be set to disable on usb DEVLOCK.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/usbutils.c b/usbutils.c
index 052a55f..eeec6aa 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -1465,7 +1465,7 @@ 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_DEFERRED, &_pth_state); \
+			pthread_setcanceltype(PTHREAD_CANCEL_DISABLE, &_pth_state); \
 			wr_lock(cgpu->usbinfo.devlock); \
 			} while (0)