Misc fixes and race condition cleaning

This commit is contained in:
Abramo Bagnara 2000-10-15 14:15:30 +00:00
parent 633815a591
commit d5c49aaa8e
6 changed files with 295 additions and 283 deletions

View file

@ -468,9 +468,6 @@ static int snd_pcm_shm_close(snd_pcm_t *pcm)
snd_pcm_shm_t *shm = pcm->private;
volatile snd_pcm_shm_ctrl_t *ctrl = shm->ctrl;
int result;
if (!(pcm->mode & SND_PCM_NONBLOCK) &&
snd_pcm_shm_state(pcm) == SND_PCM_STATE_RUNNING)
snd_pcm_shm_drain(pcm);
ctrl->cmd = SND_PCM_IOCTL_CLOSE;
result = snd_pcm_shm_action(pcm);
shmdt((void *)ctrl);