00121f9812
CPU0 CPU1 1. feed0 thread feed1 thread (prio 1 affinity) (prio 1 affinity) 2. nsh_main sched_lock() 3. waitpid() hello_main 4. ------ hello exit() 5. ------ exit()->exit_wakeup()->wakeup nsh -> add_readytorun()-> nsh at schedlock state set g_cpu_schedlock 6. ----- exit()->nxtask_exit()->remove_readytorun() -> check g_cpu_schedlock -> pick idle1 7. waitpid() return idle thread 8. sched_unlock idle thread The error is in step 6: pick a idle thread to execute not feed1 thread. resolve: remove the schedlocked-check in remove_readytorun() Signed-off-by: ligd <liguiding1@xiaomi.com> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Make.defs | ||
sched_addblocked.c | ||
sched_addprioritized.c | ||
sched_addreadytorun.c | ||
sched_backtrace.c | ||
sched_cpuload_oneshot.c | ||
sched_cpuload_period.c | ||
sched_cpuload.c | ||
sched_cpupause.c | ||
sched_cpuselect.c | ||
sched_critmonitor.c | ||
sched_foreach.c | ||
sched_get_stackinfo.c | ||
sched_get_stateinfo.c | ||
sched_get_tls.c | ||
sched_getaffinity.c | ||
sched_getcpu.c | ||
sched_getfiles.c | ||
sched_getparam.c | ||
sched_getscheduler.c | ||
sched_gettcb.c | ||
sched_idletask.c | ||
sched_lock.c | ||
sched_lockcount.c | ||
sched_mergepending.c | ||
sched_mergeprioritized.c | ||
sched_processtimer.c | ||
sched_releasetcb.c | ||
sched_removeblocked.c | ||
sched_removereadytorun.c | ||
sched_reprioritize.c | ||
sched_reprioritizertr.c | ||
sched_resumescheduler.c | ||
sched_roundrobin.c | ||
sched_rrgetinterval.c | ||
sched_self.c | ||
sched_setaffinity.c | ||
sched_setparam.c | ||
sched_setpriority.c | ||
sched_setscheduler.c | ||
sched_smp.c | ||
sched_sporadic.c | ||
sched_suspend.c | ||
sched_suspendscheduler.c | ||
sched_sysinfo.c | ||
sched_thistask.c | ||
sched_timerexpiration.c | ||
sched_unlock.c | ||
sched_verifytcb.c | ||
sched_wait.c | ||
sched_waitid.c | ||
sched_waitpid.c | ||
sched_yield.c | ||
sched.h |