use mutex instead of semaphore in CAPI 2.0 interface