Add functions for synchronization primitives