Hi, all:

The function sched_lock() is used to disable preemption,
I also see a lot about sched_lock() discussion in the community,
and based on my own experience,I believe that sched_lock() is very
easy to misuse and difficult to understand ,  especially in SMP where
sched_lock() has caused many bugs.

I think sched_lock() should be completely removed
1 most case we can replace sched_lock() with enter_critical_section(),
at the sametime we add sched_lock()'s ability to the enter_critical_section()
2 we can replace sched_lock() with mutex ,sem or spinlock。
3 directly removal

Any comments are very welcome!

BR!

Reply via email to