The following definitions work when using DEFINE_PER_CPU in the Linux kernel:
DEFINE_PER_CPU(struct foo, f);
I now want to define an array of pointers to structures using the same.
Assume the structure is called
, and is to be named
. I then tried:
DEFINE_PER_CPU(struct *foo, bar);
However, it results in a compilation error. I also tried a couple of other permutations, but am unable to make it work. Can anyone please point out what will work, and why?
I understand that a workaround could be to create a wrapper structure that stores the pointer which can be used by one of the methods above, but I would like to know how to make it work with pointers.
EDIT: Struct foo does not work either.