summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Whittle <awhittle@ualberta.ca>2017-12-09 10:13:52 -0700
committerAndrew Whittle <awhittle@ualberta.ca>2017-12-09 10:13:52 -0700
commit01d6723d5bd86a4070db35a046d41f2e37568579 (patch)
tree176a6d4c5864c328073a828b01fc414f08cb1f21
parent31a078416042d5492540f4bdb1466a84b690430e (diff)
downloadxmr-stak-01d6723d5bd86a4070db35a046d41f2e37568579.zip
xmr-stak-01d6723d5bd86a4070db35a046d41f2e37568579.tar.gz
Fix compat_usleep for WIN32
When compiled with VS2017, the negative applied to the uint wait time is ignored. Fixed by casting first.
-rw-r--r--xmrstak/backend/nvidia/nvcc_code/cuda_core.cu2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu b/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu
index 0b175b5..1167d65 100644
--- a/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu
+++ b/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu
@@ -19,7 +19,7 @@ extern "C" void compat_usleep(uint64_t waitTime)
HANDLE timer;
LARGE_INTEGER ft;
- ft.QuadPart = -(10*waitTime); // Convert to 100 nanosecond interval, negative value indicates relative time
+ ft.QuadPart = -10*(LONGLONG)waitTime; // Convert to 100 nanosecond interval, negative value indicates relative time
timer = CreateWaitableTimer(NULL, TRUE, NULL);
SetWaitableTimer(timer, &ft, 0, NULL, NULL, 0);
OpenPOWER on IntegriCloud