Hello,
I've recently been doing a lot of systems programming and low-level stuff. I'm hacking away on MIT's xv6 kernel for my OS course. I want to improve my C skills, and want to learn the limits of what can be done with C, the preprocessor etc. I'd be really grateful if some one could direct me to resources that would help me out in this regard.
I want to basically learn how to write robust, readable and production-quality C which doesn't crash to a segfault.
Also, is there a oft-used style guide for writing error-handling code in C?
Thank you.
http://lars-lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf
http://www.leshatton.org/MISRA_comp_1105.html
http://www.leshatton.org/ISOC_subset1103.html
http://www.embedded.com/electronics-blogs/embedded-systems-d...
For the related topic of secure code, these books are good:
Mark Dowd. 2006. The Art of Software Security Assessment.
Robert Seacord. 2013. Secure Coding in C and C++, 2e.
For details on what is really going on inside C:
Paul Anderson. 1998. Advanced C: Tips and Techniques.
Kenneth Louden. 1997. Compiler Construction: Principles and Practice. Chapter 7.
For C gotchas and general good practices:
http://www.cs.tufts.edu/comp/40/reference/CTrapsAndPitfalls....
Allen Holub. 1995. Enough Rope to Shoot Yourself in the Foot.
P.J. Plauger. 1991. The Standard C Library. (It is partly a reference, but also has detailed discussion of the technical considerations faced in writing reliable code.)