arch/sim: Fix the wrong sleep time calculation in sim_idle_trampoline
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
53f33a7ea2
commit
78862c51dc
@ -135,6 +135,9 @@ void sched_note_cpu_resume(struct tcb_s *tcb, int cpu);
|
|||||||
static void *sim_idle_trampoline(void *arg)
|
static void *sim_idle_trampoline(void *arg)
|
||||||
{
|
{
|
||||||
struct sim_cpuinfo_s *cpuinfo = (struct sim_cpuinfo_s *)arg;
|
struct sim_cpuinfo_s *cpuinfo = (struct sim_cpuinfo_s *)arg;
|
||||||
|
#ifdef CONFIG_SIM_WALLTIME
|
||||||
|
uint64_t now = 0;
|
||||||
|
#endif
|
||||||
sigset_t set;
|
sigset_t set;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -173,8 +176,6 @@ static void *sim_idle_trampoline(void *arg)
|
|||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SIM_WALLTIME
|
#ifdef CONFIG_SIM_WALLTIME
|
||||||
uint64_t now = 0;
|
|
||||||
|
|
||||||
/* Wait a bit so that the timing is close to the correct rate. */
|
/* Wait a bit so that the timing is close to the correct rate. */
|
||||||
|
|
||||||
now += 1000 * CONFIG_USEC_PER_TICK;
|
now += 1000 * CONFIG_USEC_PER_TICK;
|
||||||
|
Loading…
Reference in New Issue
Block a user