Post
Topic
Board Hardware
Re: Klondike - 16 chip ASIC Open Source Board - Preliminary
by
terrahash
on 12/07/2013, 18:28:17 UTC
Your method works!!!

I added

nmsleep(100); \

and everything works like a charm.

128M ~ 8/m WU
256M ~ 17/m WU

BBKCoins, please be noticed. This might be a common issue.
Are you guys both on Windows? I noticed that the Windows timeout values are defined much longer and I wonder if this is related. For Linux the timeout is 200mS but WIN32 is 999 mS. Note that I do all my testing on Linux and libusb could behave differently here.

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.

Code:
#define DEVLOCK(cgpu, _pth_state) do { \
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &_pth_state); \
nusleep(1); \
wr_lock(cgpu->usbinfo.devlock); \
} while (0)