Adding barrier to concurrency synchronizing structures