break;
}
/* do not eat all CPU, time out after 1 se*/
- usleep(100*1000);
+ alive_sleep(100);
}
if (i==10)
{
if ((buf_get_u32(dbg_stat->value, EICE_DBG_STATUS_DBGACK, 1))
&& (buf_get_u32(dbg_stat->value, EICE_DBG_STATUS_SYSCOMP, 1)))
break;
- usleep(100000);
+ alive_sleep(100);
}
if (timeout == 50)
{
break;
}
/* do not eat all CPU, time out after 1 se*/
- usleep(100*1000);
+ alive_sleep(100);
}
if (i==10)
{
break;
}
/* do not eat all CPU, time out after 1 se*/
- usleep(100*1000);
+ alive_sleep(100);
}
if (i==10)
{
while (target->state != TARGET_HALTED)
{
- usleep(10000);
+ alive_sleep(10);
target_poll(target);
if ((timeout_ms -= 10) <= 0)
{
timeout_ms = 1000;
while (target->state != TARGET_HALTED)
{
- usleep(10000);
+ alive_sleep(10);
target_poll(target);
if ((timeout_ms -= 10) <= 0)
{
samples[numSamples++]=t;
retval = target_resume(target, 1, 0, 0, 0); /* current pc, addr = 0, do not handle breakpoints, not debugging */
target_poll(target);
- usleep(10*1000); // sleep 10ms, i.e. <100 samples/second.
+ alive_sleep(10); // sleep 10ms, i.e. <100 samples/second.
} else if (target->state == TARGET_RUNNING)
{
// We want to quickly sample the PC.