We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7785b74 commit 152604cCopy full SHA for 152604c
1 file changed
src/io/cuda/cuda.cc
@@ -877,15 +877,20 @@ static bool tryProcessCudaEvent(const SystemEvent &ev)
877
ht_printf("process %d\n", ev.key.pressed);
878
while (sys_get_hiresclk_ticks() < time_end) {
879
sys_lock_mutex(gCUDAMutex);
880
+ static int lockuphack = 0;
881
if (gCUDA.state == cuda_idle) {
882
if (!gCUDA.left /*&& !(gCUDA.rIFR & SR_INT)*/) {
883
+ lockuphack = 0;
884
bool k = doProcessCudaEvent(ev);
885
sys_unlock_mutex(gCUDAMutex);
886
// IO_CUDA_WARN("Tried to process event: %d.\n", k);
887
return k;
888
} else {
889
IO_CUDA_WARN("left: %d\n", gCUDA.left);
-// pic_raise_interrupt(IO_PIC_IRQ_CUDA);
890
+ if (lockuphack++ == 20) {
891
+ gCUDA.left = 0;
892
893
+ }
894
}
895
896
IO_CUDA_TRACE2("cuda not idle (%d)!\n", gCUDA.state);
0 commit comments