Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3aa6a088 authored by Raghavendra Rao Ananta's avatar Raghavendra Rao Ananta Committed by Elliot Berman
Browse files

haven: msgq: Make the send/recv wait if the cap-id is not ready



It's a highly likely situation that the clients call hh_msgq_recv()
from a thread in a polling fashion, and these threads are spawned
during client driver's initialization. Hence, it's possible that
the cap-ids for the message queues will not be ready so early and
the clients would end up continuously spinning on hh_msgq_recv(),
receiving the error -EAGAIN. To avoid this situation, put the
client process onto a wait-queue until the cap-ids are ready.

Although a little unlikely, to satisfy the symmetry, add the same
provision for the callers of hh_msgq_send() as well.

Change-Id: I4e042215c5e43271d566340ce1ef9c52ecafeb5c
Signed-off-by: default avatarRaghavendra Rao Ananta <rananta@codeaurora.org>
Signed-off-by: default avatarMurali Nalajala <mnalajal@codeaurora.org>
parent eb5a7871
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment