<p dir="ltr">So, it's just an override? <br>
Why return true and not false?</p>
<div class="gmail_quote">Il 21 giu 2016 4:32 AM, "Nathan Williams" <<a href="mailto:ngwilliams@gmail.com">ngwilliams@gmail.com</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 2016-06-21 at 00:48 +0200, Andrea Benelli wrote:<br>
> Hello, i was looking at the linux/sched.h (kernel version 4.6.2)<br>
> source code and i found this function at line 1174:<br>
><br>
> static inline bool cpus_share_cache(int this_cpu, int that_cpu)<br>
> {<br>
> return true;<br>
> }<br>
><br>
> I'm not able to understand the utility of a function that just return<br>
> a true value.<br>
> i've noticed that there are a lot of functions like this (function<br>
> that just return a constant).<br>
<br>
Hi Andrea,<br>
<br>
That's the case for when CONFIG_SMP isn't defined. What happens when<br>
CONFIG_SMP is defined?<br>
<br>
I suggest having a look through the code with a Linux cross reference:<br>
<br>
<a href="http://lxr.free-electrons.com/ident?v=4.6;i=cpus_share_cache" rel="noreferrer" target="_blank">http://lxr.free-electrons.com/ident?v=4.6;i=cpus_share_cache</a><br>
<br>
Regards,<br>
Nathan<br>
<br>
</blockquote></div>