Where is PageHead defined in v5.0?

Jesse Simpson jesse.simpson36 at gmail.com
Thu Mar 28 16:49:29 EDT 2019


On Thu, Mar 28, 2019 at 01:50:47AM -0400, Valdis Klētnieks wrote:
> On Wed, 27 Mar 2019 17:23:05 -0700, Igor Pylypiv said:
> > and TESTPAGEFLAG defines PageHead:
> >         #define TESTPAGEFLAG(uname, lname, policy) \
> >         static __always_inline int Page##uname(struct page *page)
> >         (https://elixir.bootlin.com/linux/v5.0.5/source/include/linux/page-flags.h#L215)
> 
> General tip:  If you're trying to find where the kernel defines FooBar,
> and 'git grep FooBar' only finds uses and no definitions, it probably
> means somebody got over-exuberant with the ## pre-processor
> operator
> 
> 'git grep Foo##' usually reveals the culprit. ;)

Thanks for the tip Valdis. I'm going to look more into the ## operator so that
I can understand it's use case better. I've used macros before but this
one seems a bit strange.

:)

Jesse Simpson





More information about the Kernelnewbies mailing list