1
0
Fork 0
forked from nuttx/nuttx-update

Revert "drivers/pm: pm_smp remove sched_lock"

Now we already support sched_lock for per cpu/tcb

This reverts commit 731af5b42f.
This commit is contained in:
buxiasen 2024-11-18 16:09:30 +08:00 committed by Xiang Xiao
parent ab3b128805
commit f0185cf4db

View file

@ -148,11 +148,10 @@ void pm_idle(pm_idle_handler_t handler)
/* If sched lock before irq save, and irq handler do post, scheduler will
* be delayed after WFI until next sched unlock. which is not acceptable.
* per cpu sched_lock/unlock is not available here, all post/wait api will
* not allow in pm_callbacks.
*/
flags = up_irq_save();
sched_lock();
oldstate = pm_querystate(domain);
newstate = pm_checkstate(domain);
@ -203,11 +202,10 @@ void pm_idle(pm_idle_handler_t handler)
/* If there is pending irq, enable irq make handlers finish all
* execution will be better decrease scheduler context switch times.
* per cpu sched_lock/unlock is not available here, all post/wait api will
* not allow in pm_callbacks.
*/
up_irq_restore(flags);
sched_unlock();
}
#else