--- zzzz-none-000/linux-4.4.271/kernel/locking/semaphore.c 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/kernel/locking/semaphore.c 2023-04-19 10:22:30.000000000 +0000 @@ -32,6 +32,9 @@ #include #include #include +#if defined(CONFIG_AVM_FASTIRQ) +#include +#endif/*--- #if defined(CONFIG_AVM_FASTIRQ) ---*/ static noinline void __down(struct semaphore *sem); static noinline int __down_interruptible(struct semaphore *sem); @@ -261,3 +264,14 @@ waiter->up = true; wake_up_process(waiter->task); } + +struct task_struct *__rte_sem_partial_wake(struct semaphore *sem) +{ + struct semaphore_waiter *waiter = list_first_entry(&sem->wait_list, + struct semaphore_waiter, list); + + list_del(&waiter->list); + waiter->up = true; + + return waiter->task; +}