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:Raghavendra Rao Ananta <rananta@codeaurora.org> Signed-off-by:
Murali Nalajala <mnalajal@codeaurora.org>
Loading
Please register or sign in to comment