static int mutex_lock(int id)
{
struct sembuf sops[4];
- int ret;
DSS_DEBUG_LOG(("locking\n"));
sops[3].sem_op = 1;
sops[3].sem_flg = SEM_UNDO | IPC_NOWAIT;
- ret = do_semop(id, sops, 4);
- if (ret < 0)
- return -ERRNO_TO_DSS_ERROR(errno);
- return 1;
+ return do_semop(id, sops, 4);
}
static bool mutex_is_locked(int id)