OSDN Git Service
(root)
/
android-x86
/
external-alsa-lib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
745062e
)
Fix call of semctl IPC_RMID
author
Takashi Iwai
<tiwai@suse.de>
Mon, 29 Aug 2005 17:07:41 +0000
(17:07 +0000)
committer
Takashi Iwai
<tiwai@suse.de>
Mon, 29 Aug 2005 17:07:41 +0000
(17:07 +0000)
semctl IPC_RMID removes all semaphore set, so we need to call this only once.
src/pcm/pcm_direct.c
patch
|
blob
|
history
diff --git
a/src/pcm/pcm_direct.c
b/src/pcm/pcm_direct.c
index
8d70e52
..
1e810cb
100644
(file)
--- a/
src/pcm/pcm_direct.c
+++ b/
src/pcm/pcm_direct.c
@@
-73,14
+73,10
@@
int snd_pcm_direct_semaphore_create_or_connect(snd_pcm_direct_t *dmix)
int snd_pcm_direct_semaphore_discard(snd_pcm_direct_t *dmix)
{
- int i;
-
if (dmix->semid < 0)
return -EINVAL;
- for (i = 0; i < DIRECT_IPC_SEMS; i++) {
- if (semctl(dmix->semid, i, IPC_RMID, NULL) < 0)
- return -errno;
- }
+ if (semctl(dmix->semid, 0, IPC_RMID, NULL) < 0)
+ return -errno;
dmix->semid = -1;
return 0;
}