These are great, I had forgotten about them!
The Linux kernel is a fantastic resource. Any time I need to do some systems programming that I haven't done before, I check to see how it's done in the kernel.
Re:Bithacks.h - bit hack macros
by electronslave on Thursday September 03, 2009 @01:59PM
(#803046)
Seconded. That's probably one of the best places to find bit twiddling resouces ever. I remember I had one of those Coriolis kernel printout books back in the 90s, and I used to crib from that, some hashing function and the page allocator all the time.
http://miller.cs.wm.edu/lxr3.linux/http/source/include/linux...
http://miller.cs.wm.edu/lxr3.linux/http/source/include/linux...
http://miller.cs.wm.edu/lxr3.linux/http/source/lib/bitmap.c?...