e9e8e3f3ca
There can be a race condition that the sem has alread been detached after we did the cleanup. Besides, there is a RT_IPC_CMD_RESET command in rt_sem_control which is more clear in setting the sem values.