On Sun, Jan 24, 2010 at 4:48 AM, Himanshu Chauhan
<[email protected]> wrote:
> Hi Mulyadi,
>
> The file mm-flags.h defines a set of macros like
>
> #define TESTPAGEFLAG(uname, lname)                                      \
> static inline int Page##uname(struct page *page)                        \
>                        { return test_bit(PG_##lname, &page->flags); }
>
> This macro creates the function you are lookign for. PG_swapbacked is the
> bit for marking if page is backed by swap. I believe ##uname of swapbacked
> is equivalent to SwapBacked and similarly lname is swapbacked itself.

Thanks a lot! :)

Perhaps there's a slight difference between kernel versions, but in my
local copy of 2.6.32 vanilla source tree, it's in
include/linux/page-flags.h. However, the definitions you mention above
remain the same.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to