sim/smp: fix smp can't start, caused by signal too busy

N/A

Change-Id: Ia9cad04759a869f9bed871fa0acd002115eefb0a
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong
2021-07-08 14:15:01 +08:00
parent 4c867f3b6d
commit 1ecbc99b21
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ uint64_t host_gettime(bool rtc)
void host_sleep(uint64_t nsec)
{
usleep(nsec / 1000);
usleep((nsec + 999)/ 1000);
}
/****************************************************************************
+2 -2
View File
@@ -148,7 +148,7 @@ static void *sim_host_timer_handler(void *arg)
while (g_nx_initstate < 5)
{
host_sleep(10 * 1000); /* 10ms */
host_sleep(10 * 1000 * 1000); /* 10ms */
}
/* Send a periodic timer event to CPU0 */
@@ -156,7 +156,7 @@ static void *sim_host_timer_handler(void *arg)
while (1)
{
pthread_kill(g_cpu_thread[0], SIGUSR1);
host_sleep(10 * 1000); /* 10ms */
host_sleep(10 * 1000 * 1000); /* 10ms */
}
return NULL;