GCC Extension for detecting Critical Sections in a Multi-threaded Environment