parameter check for cond, mutex, list and spinlock, begin semaphore