diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2017-08-03 13:20:41 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-08-04 16:50:55 +0200 |
commit | 4c8099e9cad5ba11c770042549f68e7687eaa72b (patch) | |
tree | 402921d409b70e188d7b4b2d2bc89f0b52280dd8 /include | |
parent | ALSA: control: queue events within locking of controls_rwsem for TLV operation (diff) | |
download | linux-4c8099e9cad5ba11c770042549f68e7687eaa72b.tar.xz linux-4c8099e9cad5ba11c770042549f68e7687eaa72b.zip |
ALSA: control: use counting semaphore as write lock for TLV write/command operations
In ALSA control interface, applications can execute three types of request
for Type-Length-Value (TLV) data to a set of elements; read, write and
command. In ALSA control core, all of the requests are handled within read
lock to a counting semaphore, therefore several processes can run to access
to the data at the same time for any purposes. This has an issue because
write and command requests have side effect to change state of a set of
elements for the TLV data. Concurrent access should be controlled for each
of reference/change case.
This commit uses the counting semaphore as read lock for TLV read requests,
while use it as write lock for TLV write/command requests. The state of a
set of elements for the TLV data is maintained exclusively between read
requests and write/command requests, or between write and command requests.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions