nuttx/sched/sched
ligd 00121f9812 sched: delete check when pick nexttcb in readytorun list
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>
2023-11-24 12:43:54 +09:00
..
CMakeLists.txt task/pthread_cancelpt: Fix task_delete from another task group 2023-11-22 08:05:58 -08:00
Make.defs task/pthread_cancelpt: Fix task_delete from another task group 2023-11-22 08:05:58 -08:00
sched_addblocked.c
sched_addprioritized.c
sched_addreadytorun.c
sched_backtrace.c
sched_cpuload_oneshot.c sched: explicitly select the cpuload clock source configuration 2023-11-01 09:27:56 +08:00
sched_cpuload_period.c sched: explicitly select the cpuload clock source configuration 2023-11-01 09:27:56 +08:00
sched_cpuload.c sched: explicitly select the cpuload clock source configuration 2023-11-01 09:27:56 +08:00
sched_cpupause.c
sched_cpuselect.c
sched_critmonitor.c clock: replace all up_perf_xx with perf_xx 2023-10-02 16:11:43 +02:00
sched_foreach.c vfs:add nxsched_foreach to sched_lock avoid crash 2023-08-29 10:36:21 +08:00
sched_get_stackinfo.c
sched_get_stateinfo.c
sched_get_tls.c task/pthread_cancelpt: Fix task_delete from another task group 2023-11-22 08:05:58 -08:00
sched_getaffinity.c
sched_getcpu.c
sched_getfiles.c
sched_getparam.c
sched_getscheduler.c
sched_gettcb.c
sched_idletask.c
sched_lock.c spinlock: Rename spin_islocked to spin_is_locked 2023-10-06 20:03:19 -04:00
sched_lockcount.c
sched_mergepending.c
sched_mergeprioritized.c
sched_processtimer.c sched/cpuload: add SCHED_CPULOAD_OSCLK option 2023-08-04 10:58:54 -07:00
sched_releasetcb.c sched: explicitly select the cpuload clock source configuration 2023-11-01 09:27:56 +08:00
sched_removeblocked.c
sched_removereadytorun.c sched: delete check when pick nexttcb in readytorun list 2023-11-24 12:43:54 +09:00
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: Exit immediately when cpuset change to 0. 2023-10-18 21:12:35 +08:00
sched_sporadic.c mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
sched_suspend.c
sched_suspendscheduler.c
sched_sysinfo.c sched: explicitly select the cpuload clock source configuration 2023-11-01 09:27:56 +08:00
sched_thistask.c
sched_timerexpiration.c SMP: fix repeat entry timer_start 2023-08-21 13:20:56 +08:00
sched_unlock.c spinlock: Rename spin_islocked to spin_is_locked 2023-10-06 20:03:19 -04:00
sched_verifytcb.c
sched_wait.c
sched_waitid.c
sched_waitpid.c fix wait after vfork return error 2023-09-08 00:53:56 +03:00
sched_yield.c
sched.h task/pthread_cancelpt: Fix task_delete from another task group 2023-11-22 08:05:58 -08:00