added mutex module to synchronize access to non thread-safe resources

Mofified cBindings to test the use of synchronization