modified:   CMakeLists.txt
    C99 option added

	new file:   src/misc/sync.c
	new file:   src/misc/sync.h
	new file:   test/misc/sync_test.cpp
    Cleaner synchronisation for pthread