[PATCH v3 2/7] add synchronisation to system library