mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-05 11:34:16 +00:00
We should be setting cancelstate, not canceltype when disabling it for usb locking.
This commit is contained in:
parent
2eb6d35795
commit
9a9613b6ee
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user