Skip to content
Unverified Commit 99fd6e87 authored by Vincent Chen's avatar Vincent Chen Committed by Palmer Dabbelt
Browse files

RISC-V: Add _TIF_NEED_RESCHED check for kernel thread when CONFIG_PREEMPT=y



The cond_resched() can be used to yield the CPU resource if
CONFIG_PREEMPT is not defined. Otherwise, cond_resched() is a dummy
function. In order to avoid kernel thread occupying entire CPU,
when CONFIG_PREEMPT=y, the kernel thread needs to follow the
rescheduling mechanism like a user thread.

Signed-off-by: default avatarVincent Chen <vincentc@andestech.com>
Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parent 49a57857
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment