Recent compilers seem to have an issue with atomic :
/home/alexv/Projects/tinythreadpp/test/test.cpp:51:1: error: reference to ‘atomic_flag’ is ambiguous
atomic_flag gFlag(ATOMIC_FLAG_INIT);
Indeed atomic_flag is redefined in tinythread.h, even if it might not be necessary (already included in standard atomic_base.h)