sched: move task_util() to sched.h
The same task_util() inline function is defined in fair.c and rt.c.
Move it to a common header file.
While at it, make sure that this function works for 32 bit also.
Previously,
util = ((u64)demand)<<10/sched_ravg_window
This division of two 64 bit quantities gives a linker error on 32
bit system. The same result can be achieved without type casting
the demand to 64 bit and without losing precision by making it
util = demand/(sched_ravg_window>>10).
Change-Id: Iffc2b6b484fbcdac8d6f9739f96798a8d8e035c5
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Loading
Please register or sign in to comment