sched: do not crash for priority multi-boost

aio client will queue asynchronous io requests to the worker threads.
if PRIORITY_INHERITANCE is enabled, client thread's priority will be
set to worker threads. There will be multi-boost/restore of worker
threads' priority and assert the system.

No need priority multi-boot/restore to worker thread because client
thread's priority is alway the same.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
This commit is contained in:
fangxinyong 2023-09-08 12:36:19 +08:00 committed by Petro Karashchenko
parent 33da959fbc
commit a73f5f86dc

View File

@ -68,7 +68,10 @@ static void lpwork_boostworker(pid_t wpid, uint8_t reqprio)
/* REVISIT: Priority multi-boost is not supported */
DEBUGASSERT(wtcb->boost_priority == 0);
if (wtcb->boost_priority != 0)
{
return;
}
/* If the priority of the client thread that is greater than the base
* priority of the worker thread, then we may need to adjust the worker
@ -131,7 +134,10 @@ static void lpwork_restoreworker(pid_t wpid, uint8_t reqprio)
/* REVISIT: Priority multi-boost is not supported. */
DEBUGASSERT(wtcb->boost_priority == reqprio);
if (wtcb->boost_priority != reqprio)
{
return;
}
/* Clear the threat boost priority. */