Thread (5 messages) 5 messages, 3 authors, 2016-06-23

What is the point of this function?

From: Nathan Williams <hidden>
Date: 2016-06-21 02:31:54

On Tue, 2016-06-21 at 00:48 +0200, Andrea Benelli wrote:
Hello, i was looking at the linux/sched.h (kernel version 4.6.2)
source code and i found this function at line 1174: 

static inline bool cpus_share_cache(int this_cpu, int that_cpu)
{
        return true;
}

I'm not able to understand the utility of a function that just return
a true value. 
i've noticed that there are a lot of functions like this (function
that just return a constant). 
Hi Andrea,

That's the case for when CONFIG_SMP isn't defined. What happens when
CONFIG_SMP is defined?

I suggest having a look through the code with a Linux cross reference:

http://lxr.free-electrons.com/ident?v=4.6;i=cpus_share_cache

Regards,
Nathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help