atop defined

Jeremy C. Reed reed at
Mon Mar 6 14:33:29 PST 2006

I see
#define atop(x)                 ((x) >> PAGE_SHIFT)
in sys/*/include/param.h. And ptoa defined there too.

I was building a package from pkgsrc that defined its own "atop" and 
"ptoa. I finally used gcc -E to track down the various syntax errors and 
found the "(x) >> PAGE_SHIFT".

Should or could this definition be within the #ifdef _KERNEL ??

For now, I just patch the third-party software.

(Please CC me on replies.)

 Jeremy C. Reed

p.s. I have submitted patches for spamd to the pkgsrc maintainer.

More information about the Kernel mailing list