<p dir="ltr">Ok, thank you!</p>
<div class="gmail_quote">Il 22 giu 2016 3:08 PM, "Daniel." <<a href="mailto:danielhilst@gmail.com">danielhilst@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">The function body you see will be use only when CONFIG_SMP is not<br>
present. Take a look at<br>
<a href="https://www.kernel.org/doc/Documentation/CodingStyle" rel="noreferrer" target="_blank">https://www.kernel.org/doc/Documentation/CodingStyle</a><br>
Chapter 20: Conditional Compilation<br>
<br>
Regards,<br>
<br>
2016-06-21 8:56 GMT-03:00 Andrea Benelli <<a href="mailto:andreabenelli77@gmail.com">andreabenelli77@gmail.com</a>>:<br>
> So, it's just an override?<br>
> Why return true and not false?<br>
><br>
> Il 21 giu 2016 4:32 AM, "Nathan Williams" <<a href="mailto:ngwilliams@gmail.com">ngwilliams@gmail.com</a>> ha scritto:<br>
>><br>
>> 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>
><br>
> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
><br>
<br>
<br>
<br>
--<br>
"Do or do not. There is no try"<br>
Yoda Master<br>
</blockquote></div>