Support for Thread Safety Analysis in C

Patch by Ethan Jackson.