Skip to content

Commit 6b116ab

Browse files
committed
Cast time_delta for more intuitive
1 parent 779f478 commit 6b116ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clint.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void clint_update_interrupts(hart_t *hart, clint_state_t *clint)
77
{
88
uint64_t time_delta =
99
clint->mtimecmp[hart->mhartid] - semu_timer_gettime(&hart->time);
10-
if (time_delta & 0x8000000000000000 || time_delta == 0)
10+
if ((int32_t)time_delta <= 0)
1111
hart->sip |= RV_INT_STI_BIT;
1212
else
1313
hart->sip &= ~RV_INT_STI_BIT;

0 commit comments

Comments
 (0)