News for hackers. Stuff that matters.
Re:Bithacks.h - bit hack macros by scott_s on Thursday September 03, 2009 @09:01AM (#802347)
Whenever I need to do bit manipulations, I always check the Linux kernel source. I figure that any bit manipulation I'd ever want to do is also done in the kernel, and I'm usually right:

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?...

Re:Bithacks.h - bit hack macros by pkrumins on Thursday September 03, 2009 @03:12PM (#803243)
These are great, I had forgotten about them!
Re:Bithacks.h - bit hack macros by scott_s on Thursday September 03, 2009 @03:31PM (#803303)
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.