mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
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:
@@ -66,7 +66,7 @@ uint64_t host_gettime(bool rtc)
|
||||
|
||||
void host_sleep(uint64_t nsec)
|
||||
{
|
||||
usleep(nsec / 1000);
|
||||
usleep((nsec + 999)/ 1000);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user