I am on Ubuntu.
Update: I changed the delay to
1 usec only (that is one micro sec), and its still working. Removing the delay again breaks it, and cgminer starts hanging for 1-2 minutes. I am quiet positive there is an issue with threading/locking.
#define DEVLOCK(cgpu, _pth_state) do { \
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &_pth_state); \
nusleep(1); \
wr_lock(cgpu->usbinfo.devlock); \
} while (0)
Very odd. I'm on Ubuntu 12.04 and I don't have this problem.
Or did you pull updates from cgminer github? I used 3.3.1 for mine but have not pulled down any updates since.