soc: qcom: ramdump: Rework multiple reader synchronization
The synchronization for multiple readers makes it so that if
a reader opens a ramdump_* node, and tries to close it without
reading the contents, and while there is a ramdump in progress,
then that thread will have to wait until the thread that
initiated the response times out. This is because the
implementation assumes that the only condition by which
consumers can finish their work with the ramdump, and wake
the ramdump thread is by reading the ramdump. This is not
correct, as the ramdump node can also be closed at any time,
including during the time that a ramdump is being read.
Rework the implementation to consider both reading the ramdump,
and closing the ramdump nodes as conditions that can result in
waking the ramdump thread, and fix the synchronization so that
if threads want to open/close the nodes, and there is a ramdump
in progress, they need not wait for that ramdump to finish.
Change-Id: I6135342492081092de58362387807da29c5568d7
Signed-off-by:
Isaac J. Manjarres <isaacm@codeaurora.org>
Loading
Please register or sign in to comment