diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2018-03-15 12:53:56 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2018-03-15 12:53:56 +0100 |
commit | 3c4d8f65896253a82e19adcbe2808a863a99f74f (patch) | |
tree | fc7c3fbe15027e752c8a7da3d42c9a37d4d72c87 /src/libpiano | |
parent | 2e51a13fe816c0c0b02f7d7a19a4c739dcb66119 (diff) | |
download | pianobar-3c4d8f65896253a82e19adcbe2808a863a99f74f.tar.gz pianobar-3c4d8f65896253a82e19adcbe2808a863a99f74f.tar.bz2 pianobar-3c4d8f65896253a82e19adcbe2808a863a99f74f.zip |
Properly protect player struct with mutex
The volatile keyword neither guarantees atomic access nor memory
visibility[1]. Although this is usually not a problem on x86, it is
incorrect to rely on this. Use mutex locks to protect all shared player
variables and enforce memory visibility.
[1] https://wiki.sei.cmu.edu/confluence/display/c/CON02-C.+Do+not+use+volatile+as+a+synchronization+primitive
Diffstat (limited to 'src/libpiano')
0 files changed, 0 insertions, 0 deletions