Skip to content

adsprpc: map the persist buffer outside the mutex #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

quic-psaddam
Copy link

Currently, allocation and mapping of buffer is happening inside mutex.If mapping on one session gets stuck on DSP,other sessions will not be able to acquire the mutex and will get hung while getting spawned. Map the buffer outside the mutex.

Currently, allocation and mapping of buffer is happening inside mutex.If
mapping on one session gets stuck on DSP,other sessions will not be able
to acquire the mutex and will get hung while getting spawned. Map the
buffer outside the mutex.

Signed-off-by: Patan Saddam <[email protected]>
}
locked = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

@@ -3947,6 +3947,7 @@ static int domain_init(int domain, int *dev) {
}
VERIFY(AEE_SUCCESS == (nErr = fastrpc_mem_open(domain)));
VERIFY(AEE_SUCCESS == (nErr = apps_mem_init(domain)));
fastrpc_log_init(domain, dsppd);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide details about the variable being passed in this function? Is it a global variable, or might its declaration be missing?

* through script. */
if ((dsppd == USERPD || dsppd == AUDIO_STATICPD ||
dsppd == SENSORS_STATICPD) && debug_build_type) {
pthread_mutex_lock(&persist_buf.mut);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add error handling for the pthread_mutex_lock(mut) failure case? It’s important to ensure that the function gracefully handles any potential locking failures to maintain robustness.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are handing code gracefully when pthread_mutex_lock fails.

Copy link
Contributor

@quic-mtharu quic-mtharu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/fastrpc_apps_user.c:3950 dsppd declaration missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants