summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/target/arm720t.c2
-rw-r--r--src/target/arm7_9_common.c2
-rw-r--r--src/target/arm920t.c2
-rw-r--r--src/target/arm926ejs.c2
-rw-r--r--src/target/armv4_5.c4
-rw-r--r--src/target/target.c2
6 files changed, 7 insertions, 7 deletions
diff --git a/src/target/arm720t.c b/src/target/arm720t.c
index e253e8ee..848cbca5 100644
--- a/src/target/arm720t.c
+++ b/src/target/arm720t.c
@@ -382,7 +382,7 @@ int arm720t_soft_reset_halt(struct target_s *target)
break;
}
/* do not eat all CPU, time out after 1 se*/
- usleep(100*1000);
+ alive_sleep(100);
}
if (i==10)
{
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index d014e4b9..c08f6aa2 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -536,7 +536,7 @@ int arm7_9_execute_sys_speed(struct target_s *target)
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)
{
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index c14f6ef8..67657c94 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -644,7 +644,7 @@ int arm920t_soft_reset_halt(struct target_s *target)
break;
}
/* do not eat all CPU, time out after 1 se*/
- usleep(100*1000);
+ alive_sleep(100);
}
if (i==10)
{
diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c
index 5aa4ed88..feb8455f 100644
--- a/src/target/arm926ejs.c
+++ b/src/target/arm926ejs.c
@@ -594,7 +594,7 @@ int arm926ejs_soft_reset_halt(struct target_s *target)
break;
}
/* do not eat all CPU, time out after 1 se*/
- usleep(100*1000);
+ alive_sleep(100);
}
if (i==10)
{
diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c
index ac73c567..3d96961b 100644
--- a/src/target/armv4_5.c
+++ b/src/target/armv4_5.c
@@ -556,7 +556,7 @@ int armv4_5_run_algorithm(struct target_s *target, int num_mem_params, mem_param
while (target->state != TARGET_HALTED)
{
- usleep(10000);
+ alive_sleep(10);
target_poll(target);
if ((timeout_ms -= 10) <= 0)
{
@@ -565,7 +565,7 @@ int armv4_5_run_algorithm(struct target_s *target, int num_mem_params, mem_param
timeout_ms = 1000;
while (target->state != TARGET_HALTED)
{
- usleep(10000);
+ alive_sleep(10);
target_poll(target);
if ((timeout_ms -= 10) <= 0)
{
diff --git a/src/target/target.c b/src/target/target.c
index f3051cb0..3ed7fc4e 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -2505,7 +2505,7 @@ int handle_profile_command(struct command_context_s *cmd_ctx, char *cmd, char **
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.