summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorManish Narang <Manish.Narang@kpit.com>2018-01-25 11:39:44 +0000
committerSimon McVittie <smcv@collabora.com>2018-02-06 19:14:27 +0000
commita6e5364d842d81b959a558c1242b54c021120c15 (patch)
tree0d6ede4d97489f4614217d872895dfdf9359a43e /test
parent1572ca928b466031c9822c1083b7bc6ce63b27c6 (diff)
downloaddbus-a6e5364d842d81b959a558c1242b54c021120c15.tar.gz
DBusPendingCall: Only update ->completed under the connection lock
If one thread is blocking on a pending call, and another thread is dispatching the connection, then we need them to agree on the value of the completed flag by protecting all accesses with a lock. Reads for this member seem to have the connection lock already, so it's sufficient to make sure that the only write also happens under the connection lock. We already set the completed flag before calling the callback, so it seems OK to stretch it to meaning that some thread has merely *taken responsibility for* calling the callback. The completed flag shares a bitfield with timeout_added, but that flag is protected by the connection lock already. Based on suggestions from Simon McVittie on <https://bugs.freedesktop.org/show_bug.cgi?id=102839>. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102839 [smcv: Revert indentation changes; add commit message] Reviewed-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit d3e03eb50eefa5a38d87f274c7de73f36468459c)
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions